Futures Daily Chart "ES".
I want to show the Price 30 minutes before real candle close.
So I've created a new trading hour and set each day end time to 15:30 (instead of 16:00), called this custom trading hour as "US Equities RTH - NIMA".
I've added a data series using new trading hour:
AddDataSeries(Instrument.FullName, new BarsPeriod { BarsPeriodType = BarsPeriodType.Day, Value = 1 }, "US Equities RTH - NIMA");
protected override void OnBarUpdate() {[INDENT]if (BarsInProgress == 1)[/INDENT][INDENT=2]return;[/INDENT][INDENT] if (CurrentBar < ATR_Length)[/INDENT][INDENT=2]return;[/INDENT][INDENT] DrawPlus.Diamondp(this, "Close - " + CurrentBar, false, 0, Closes[1][0], Brushes.Violet, true, 0.8f, Brushes.Violet); DrawPlus.Dotp(this, "ATR_H - " + CurrentBar, false, -1, Close[0] + _ATR[0], Brushes.Red, true, 0.7f, Brushes.Black); DrawPlus.Dotp(this, "ATR_L - " + CurrentBar, false, -1, Close[0] - _ATR[0], Brushes.Red, true, 0.7f, Brushes.Black); DrawPlus.Dotp(this, "STD_H - " + CurrentBar, false, -1, Close[0] + _StdDev[0], Brushes.Green, true, 0.7f, Brushes.Black); DrawPlus.Dotp(this, "STD_L - " + CurrentBar, false, -1, Close[0] - _StdDev[0], Brushes.Green, true, 0.7f, Brushes.Black);[/INDENT] }
Thanks.
Comment