There is an example here but it calculates OnEachTick.
Can anyone provide an example of how this should be implemented OnBarClose in a simple manner ?
For instance how can this be done if a variable stores the CurrentBar or resets a bool when ExitOnSessionCloseSeconds is called, so that no new orders can be open after this bar is reached or the bool is reset? Or if it's easier, how to reset a bool just before X seconds prior session close? Some examples will be appreciated.
Comment