On a single chart, I have two data series:
1) Data Series 1 is the e-Mini S&P 500 futures contract, 1 minute bar, showing 24/7 data;
2) Data Series 2 is the e-Mini S&P 500 futures contract, 15 minute bar, showing day-only session data
I have written a simple indicator that calculates two moving averages based on the data in series 2 at the end of the day session (i.e., 3:15 pm Chicago time). It then seeks to plot these levels on Data Series 1 as soon as the night session starts (at 3:30 pm Chicago time).
I've attached a chart image below that shows what this looks like. Also, here is the code for indicator:
Code: Select all
Inputs:
iSessionEnd(1515),
iFastMA(40),
iSlowMA(160);
Vars:
vFastMA(0),
vSlowMA(0);
If Time = iSessionEnd Then Begin
vFastMA = Average(Close of data2,iFastMA);
vSlowMA = Average(Close of data2,iSlowMA);
End;
Plot1(vFastMA,"FastMA");
Plot2(vSlowMA,"SlowMA");
However for the current session, the indicator stops calculating at 3:15 pm and doesn't show anything after 3:15 pm, although there is data in data series 1 after that. The last plot for this indicator occurs at 3:15 pm. In other words, today, the indicator stops calculating at 3:15 even though the indicator is placed on data series 1 and data series 1 is showing data after 3:15 pm.
So here's the question: How do I get the indicator to show the data I want after 3:15 pm? I'm stumped. Thanks for any insights.