Shift Time Open
The script shifts the bar open time. In other words, if a day bar starts forming at 00:00 by the server time, while we have set the shift of 300 minutes, the day bar opens at 19:00 (24-5(300 minutes)=19) by the server time on the shifted chart. The shift is distributed along the entire available history. The script uses the minute data, so it is better to launch it on M1.
Launching the Script
- Open a symbol chart you need;
- Set its timeframe to М1;
- Drag Shift_Time_Open script to the chart from the script list;
- Enter the necessary parameters to the newly appeared window and click OK;
- Menu -> File -> Open Offline;
- A correct name of the shifted chart is displayed in the upper left corner of the chart the script is launched at;
- Double click the symbol;
- Launch ChartRefresh script on the newly opened chart. Otherwise, the chart will not be able to update;
- To change the chart's timeframe, repeat script launching algorithm starting with the third step.
- Period_Newchart - set timeframe of the chart, the bar open time of which should be shifted;
- MinuteShift - set the time, by which the bar opening should be shifted for the new chart.
- I recommend that you download the minute chart's history before the launch.