Unfortunatelly it doesnt work. Any idea why these bars appear or whdt is the problem with my code?


Originally Posted By: jcl
There are 3 ways to get overnight bars:

- Setting Weekend at 0
- Trading another asset at the same time that is traded overnight.
- The asset still gets some price quotes overnight. This sometimes happens with CFDs.

You can use the TimeFrame mechanism for skipping overnight bars so that they don't affect indicators. Set TimeFrame to 0 when the market closes, count the skipped bars, set TimeFrame to the negative number of skipped bars when the market opens again, and to 1 while the market is open.

Last edited by konorti; 03/15/17 17:35.