Hello  Bangfu ,

I'll mention three things here:

1. You can capture both the day and night session by setting the trading 
schedule to arbitrary wide period within the day. For example:
TradingSchedule tradingSchedule = new TradingSchedule("0:01", "23:59", 
"America/New_York");

2. Alternatively, you can run three strategies at the same time, one for 
day session, and the other one for night session, and one for overnight 
session. For example:
TradingSchedule tradingSchedule = new TradingSchedule("9:30", "16:00", 
"America/New_York"); 
TradingSchedule tradingSchedule = new TradingSchedule("17:30", "23:59", 
"America/New_York");  
TradingSchedule tradingSchedule = new TradingSchedule("0:01", "9:30", 
"America/New_York");   

3. Once the trading schedule is set, you can run the strategy without 
restarting JBT or TWS until the contract expires. Effectively, once you 
start it, you can go away, and the strategy would trade every day on the 
schedule.

On Thursday, September 20, 2012 3:47:36 AM UTC-4, Bang wrote:
>
> Hi Guys
>  
> Is there any way to set the TradingSchedule for both day & night session, 
> or even a whole week? 
>  
> Thanks advance
> Bangfu
>  
>  
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"JBookTrader" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/jbooktrader/-/XaOtOXSudI0J.
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.

Reply via email to