Suppose there are three instruments putting on the same chart. But they have own different sessions and only part them are overlapped.
Data1 = 0000 ~ 2345
Data2 = 0930 ~ 1600
Data3 = 1100 ~ 1800
The overlapped period for the above three instruments is 1100~1600
Now, here comes a simple task is to print their close values in Output windows on every 5 minute bar.
Codes are as follows:
value1 = close of data1;
value2 = close of data2;
value3 = close of data3;
print(date:7:0," ", time:4:0," ",value1," ", value2," ", value3);
After running this code, MC generates their close values only on their overlapped session period. But outside this period, there is nothing happen in Output window.
Does any way to successfully output the whole day close value information even part of instrument may not in their active trading session? Can MC smart enough to ignore some missing data and keep running the rest of the code? Any exception handling feature can help in this case?
Thanks in advance.
How to keep code running in missing sessions [Solved] [SOLVED]
How to keep code running in missing sessions [Solved]
Last edited by karacraft on 03 Sep 2014, edited 1 time in total.
-
- Posts: 401
- Joined: 19 Jan 2011
- Location: Netherlands
- Has thanked: 85 times
- Been thanked: 125 times
Re: How to keep code running in missing sessions [SOLVED]
Please check in the settings of the indicator under tab "properties" to deselect the option "realtime history matching".
Maybe that could be the problem
Maybe that could be the problem