I am trying to build an indicator that displays Green dots (on the chart) showing the closing price of 1 minute ES 03-16 Bid bars. (FYI: I am building this indicator so that I can see this value on the Startegy Analyzer's chart even when I don't have the mentioned bars as my primary data series.)
This indicator seems to work fine when I manually set its "Input Series" to "ES 03-16 (1 Min)" as shown by the green arrow in attached screenshot 1.jpg. However, the indicator stops working when I change the mentioned Input Series in 1.jpg
I'm guessing the solution is to code my indicator so that its Input Series is automatically "1 minute ES 03-16 Bid Bars"?
If so, what would I change about the indicator's code (shown below) to do this?
(Also, if you need more details, the full code of the current version of my indicator can be found in the attached OneMinuteBidDotOnClose.zip file.)
Thank you so much.
protected override void Initialize() { Add("ES 03-16",PeriodType.Minute, 1, MarketDataType.Bid); Add(new Plot(Color.FromKnownColor(KnownColor.Green), PlotStyle.Dot, "Plot0")); Overlay = true; } /// <summary> /// Called on each bar update event (incoming tick) /// </summary> protected override void OnBarUpdate() { // Use this method for calculating your indicator values. Assign a value to each // plot below by replacing 'Close[0]' with your own formula. if (BarsInProgress == 1) { Plot0.Set(Closes[1][0]); } }
Comment