i am interested in having all my strategies close all positions before the regular session ends, both on historical data for optimization and testing purposes and also on tick by tick live data if i was executing my strategies for real. i have read some posts in these fora regarding - exit on session close - but i don't think any of them addressed what i have in mind.
i use large bars like 60 minute and 25 cents range bars on the cl contract and other instruments from different exchanges like eurex, nymex and cme, so i don't think the ordinary - exit on session close - command would get the job done for me.
i think i can easily add a time filter to the conditions my strategies follow for entries to guarantee no positions will be held outside of the regular session, but what would the best method be so that;
- ¿all positions on eurex instruments are closed 5 minutes before the end of the regular session (2200 cet as far as i know)?
- ¿all positions on nymex instruments are closed at 1655 et?
- ¿all positions on cme instruments are closed at 1610 et?
in all cases, i'm interested in ensuring all positions are closed both for historical and real time data and i wouldn't mind if i had to create one piece of code for each case or had to add a secondary data series to my strategies to close all positions at the desired times.
thanks, regards.
Comment