> My Problem is I like to trade day and night session for ES,DAX and
> SPI
> example SPI open 9:40 Melbourne time and close 16:30 , night
> session open at 17:10 and close next day at 7:00 am .
> My Problem is night session finish next day and I don;t know how to
> set that in?
>
You can set an exclusion in the TradingSchedule. For example:
tradingSchedule = new TradingSchedule("0:15", "23:45", "America/
New_York");
tradingSchedule.setExclusion("16:10", "17:45");
The above would work for the ES. However, there can only be one
exclusion, so it would be awkward to do the same for the SPI. Perhaps
you can run three sttrategies.
For the first one:
tradingSchedule = new TradingSchedule("9:40", "16:30", "Australia/
Sydney"); // day session
For the second one:
tradingSchedule = new TradingSchedule("0:00", "07:00", "Australia/
Sydney"); // morning session
For the third one:
tradingSchedule = new TradingSchedule("17:10", "23:59", "Australia/
Sydney"); // night session
I am willing to modify the framework if anyone finds a better way to
manage this. The easiest way seems to allow more than one exclusion.
--
You received this message because you are subscribed to the Google Groups
"JBookTrader" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jbooktrader?hl=en.