NowUCMe Posted February 21, 2017 Report Share Posted February 21, 2017 (edited) I am attempting to write a Custom Indicator and have two questions. 1. Is it possible to access the current Bid and Ask in the Advanced Paintbar Editor ? 2. Is it possible to create Parameters that can be used by the Advanced Paintbar ? i.e., I currently have code that looks at the last 4 Paintbars. Every time I want to look at a different number of Paintbars, I go to the code and change the number. What I would like is the ability change the number in the Chart indicator Selection window rather than having to Modify the Paintbar code. Is this possible ? Thanks in advance. Edited February 21, 2017 by NowUCMe Quote Link to comment Share on other sites More sharing options...
Jerry Medved Posted February 21, 2017 Report Share Posted February 21, 2017 Hi, Bid/Ask is not accessible. The Paintbar operates on the chart data, which is the candle OHLC. No bid/ask data is available to it. As for the custom parameter, not at this time. Quote Link to comment Share on other sites More sharing options...
Jerry Medved Posted February 21, 2017 Report Share Posted February 21, 2017 As far as the custom parameter, we may be able to add something Quote Link to comment Share on other sites More sharing options...
Jerry Medved Posted February 23, 2017 Report Share Posted February 23, 2017 Emailed you an update. Added: DefinePaintbarParameter(String ParameterID, string ParameterDescription = null, Boolean IsInteger = false, Double Minimum = 0, Double Maximum = 100, Double Increment = 1, Double Default = 1) Double GetPaintbarParameter(String ParameterID) Just use DefinePaintbarParameter to define it, then GetPaintbarParameter to get the user specified value Quote Link to comment Share on other sites More sharing options...
Mike Medved Posted February 23, 2017 Report Share Posted February 23, 2017 One note: the parameters to the DefinePaintbarParameter function have to be literals. Not variables. That's because what defines the parameter is not executing the function, but the pre-parser that sees the function and gets its parameter values. (That is also the reason why that function doesn't have to be called anywhere in particular. Stick it any place in the code). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.