NexusFi: Find Your Edge


Home Menu

 





Session templates in NT7


Discussion in NinjaTrader

Updated
    1. trending_up 3,649 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 6 posts
    2. attach_file 1 attachments




 
Search this Thread

Session templates in NT7

  #1 (permalink)
 
ValutaTrader's Avatar
 ValutaTrader 
Oslo,Norway
 
Experience: Intermediate
Platform: NinjaTrader
Trading: EUR/USD
Posts: 66 since Apr 2011
Thanks Given: 4
Thanks Received: 52

From what I have read, NT should handle daylight saving time with respect to templates. I live in GMT+1, and my PC is set up (Windows 7) to adjust for DST. We dont actualy shift until the last weekend of March, so we have not yet entered DST.
I am running with template US Equities RTH, which should mean 9.30-16.00 or 15.30 -22.00 here in central Europe. However, from this week, the template has shifted to 14.30-21.00 (or 8.30-15.00 NY time) , meaning that it starts one hour earlier than what I would expect. Anyone else experienced similar issues in NT7? My computer has not entered DST and displays the expected local time. The template says it should run between 9.30-16.00 in UTC-5. I have created a copy with settings 10.30-17.00 (UTC-5) today, and that corresponds to actual opening times of US Equities.

Follow me on Twitter Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
PowerLanguage & EasyLanguage. How to get the platfor …
EasyLanguage Programming
Trade idea based off three indicators.
Traders Hideout
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
How to apply profiles
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Tao te Trade: way of the WLD
24 thanks
Just another trading journal: PA, Wyckoff & Trends
24 thanks
Bigger Wins or Fewer Losses?
21 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102



ValutaTrader View Post
From what I have read, NT should handle daylight saving time with respect to templates. I live in GMT+1, and my PC is set up (Windows 7) to adjust for DST. We dont actualy shift until the last weekend of March, so we have not yet entered DST.
I am running with template US Equities RTH, which should mean 9.30-16.00 or 15.30 -22.00 here in central Europe. However, from this week, the template has shifted to 14.30-21.00 (or 8.30-15.00 NY time) , meaning that it starts one hour earlier than what I would expect. Anyone else experienced similar issues in NT7? My computer has not entered DST and displays the expected local time. The template says it should run between 9.30-16.00 in UTC-5. I have created a copy with settings 10.30-17.00 (UTC-5) today, and that corresponds to actual opening times of US Equities.

It seems that NinjaTrader is cleverer than you.

The US already has entered DST, and shifting the session times to 14:30 - 21:00 is absolutely correct, as this corresponds to 9:30 - 16:00 EST (New York) time.

The only issue is that you did not realize that DST starts two weeks earlier in the US than in Europe.

When summertime starts in Europe in 2 weeks, NinjaTrader will shift the US session back to 15:30 - 22:00.

Reply With Quote
Thanked by:
  #4 (permalink)
 
ValutaTrader's Avatar
 ValutaTrader 
Oslo,Norway
 
Experience: Intermediate
Platform: NinjaTrader
Trading: EUR/USD
Posts: 66 since Apr 2011
Thanks Given: 4
Thanks Received: 52

ah, of course

Did not look at the equity markets themselves other than the data series from the 24h future market, so I did not see that US Equities was actually closed at the same time the template finished.

Then, everything is great actually, and I would expect NT to adjust again during the last weekend of March when Europe changes.

Follow me on Twitter Started this thread Reply With Quote
  #5 (permalink)
 
ValutaTrader's Avatar
 ValutaTrader 
Oslo,Norway
 
Experience: Intermediate
Platform: NinjaTrader
Trading: EUR/USD
Posts: 66 since Apr 2011
Thanks Given: 4
Thanks Received: 52

I actually do have a second/followup question to this.

I am testing on a simulation account, with a template now that runs only between 9.30-11 US Equity time. That period seems to give good results on RangeNoGap(4) - trend following, since you get longer trends within this period relative to choppy changes.

I have ExitOnClose, and today (which may have to do with me reloading my templates) my strategies did not close my positions at 11 (end of template). Is this expected behavior? (in other words, should I flatten positions in my scripts?) I closed down everything, and reloaded my workspace and now my strategies display in yellow since both CL and GC futures come up with open positions at the end of the session (11 AM) when preloading historical calculations. I would perhaps thought that the positions would be closed at the end of the session, and strategies being green from now until Tomorrow at 9.30 when the template continues?

Attached is a screen dump of how my window looks at this point in time. Session ended at 16 GMT+1 as expected, but CL position not closed (though I have specified ExitOnClose and 120 seconds time buffer for closing).


Follow me on Twitter Started this thread Reply With Quote
  #6 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


ValutaTrader View Post
I actually do have a second/followup question to this.

I am testing on a simulation account, with a template now that runs only between 9.30-11 US Equity time. That period seems to give good results on RangeNoGap(4) - trend following, since you get longer trends within this period relative to choppy changes.

I have ExitOnClose, and today (which may have to do with me reloading my templates) my strategies did not close my positions at 11 (end of template). Is this expected behavior? (in other words, should I flatten positions in my scripts?) I closed down everything, and reloaded my workspace and now my strategies display in yellow since both CL and GC futures come up with open positions at the end of the session (11 AM) when preloading historical calculations. I would perhaps thought that the positions would be closed at the end of the session, and strategies being green from now until Tomorrow at 9.30 when the template continues?

Attached is a screen dump of how my window looks at this point in time. Session ended at 16 GMT+1 as expected, but CL position not closed (though I have specified ExitOnClose and 120 seconds time buffer for closing).


Did you use the ExitOnClose command in the Initialize() section?

Reply With Quote
  #7 (permalink)
 
ValutaTrader's Avatar
 ValutaTrader 
Oslo,Norway
 
Experience: Intermediate
Platform: NinjaTrader
Trading: EUR/USD
Posts: 66 since Apr 2011
Thanks Given: 4
Thanks Received: 52

Yes, I do actually

EntriesPerDirection = 1;
EntryHandling = EntryHandling.AllEntries;
CalculateOnBarClose = true;
IncludeCommission = true;
Slippage = 1;
ExitOnClose = true;
// RealtimeErrorHandling = RealtimeErrorHandling.TakeNoAction;
// IgnoreOverFill = true;
SetStopLoss("", CalculationMode.Ticks, sl, false);
SetProfitTarget("", CalculationMode.Ticks, tp);

Does not seem to make any difference though. However, when I investigate the logs from when I was running two instances of the strategy, it does initiate Exit On Close, so the events work. What I am not sure of however, is whether it only tries to delete the SL and TP orders associated with the positions (1 lot on each instrument/strategy) or if it tries to flatten the positions as well. In the config of NT it only says "Cancel Entry.. " and "Cancel Exit orders", and nothing about current positions. I mean, I thought it did both. It would make no sense to remove an SL but keep the position (or vice versa), leaving an unprotected market position. I believe there is an exit/uninitialize event or something that I could use to test and flatten the positions.

14.03.2012 15:59:30|1|128|Exit on close handling for strategy 'VTFlowTrader' started.
14.03.2012 15:59:30|1|128|Exit on close handling for strategy 'VTFlowTrader' started.
14.03.2012 15:59:30|1|32|Order='ad99c260b3bb404c96d2ba7b2074095a/Sim101' Name='Stop loss' New state=PendingCancel Instrument='GC 04-12' Action=BuyToCover Limit price=0 Stop price=1662,7 Quantity=1 Type=Stop Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:30|1|32|Order='cf28b5d83f7b4b5d800a8f98457d1763/Sim101' Name='Profit target' New state=PendingCancel Instrument='GC 04-12' Action=BuyToCover Limit price=1617,7 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:30|1|32|Order='937773f619004f1b863392f92c6b327c/Sim101' Name='Exit on close' New state=PendingSubmit Instrument='GC 04-12' Action=BuyToCover Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:30|1|128|Exit on close handling for strategy 'VTFlowTrader' started.
14.03.2012 15:59:30|1|32|Order='7de58f495ba54fc08d131b766132d514/Sim101' Name='Stop loss' New state=PendingCancel Instrument='CL 04-12' Action=BuyToCover Limit price=0 Stop price=108,1 Quantity=1 Type=Stop Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:30|1|32|Order='d88028f9b97e415aa24516e2cb508225/Sim101' Name='Profit target' New state=PendingCancel Instrument='CL 04-12' Action=BuyToCover Limit price=103,6 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:30|1|32|Order='adcf33423bc7473a8a61fb45a95cb005/Sim101' Name='Exit on close' New state=PendingSubmit Instrument='CL 04-12' Action=BuyToCover Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:30|1|32|Order='937773f619004f1b863392f92c6b327c/Sim101' Name='Exit on close' New state=Accepted Instrument='GC 04-12' Action=BuyToCover Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:30|1|32|Order='937773f619004f1b863392f92c6b327c/Sim101' Name='Exit on close' New state=Working Instrument='GC 04-12' Action=BuyToCover Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:30|1|32|Order='937773f619004f1b863392f92c6b327c/Sim101' Name='Exit on close' New state=Filled Instrument='GC 04-12' Action=BuyToCover Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=1 Fill price=1647,6 Error=NoError Native error=''
14.03.2012 15:59:30|1|16|Execution='dfa808194d02428e9d15369c7c60d677' Instrument='GC 04-12' Account='Sim101' Exchange=Default Price=1647,6 Quantity=1 Market position=Long Operation=Insert Order='937773f619004f1b863392f92c6b327c' Time='14.03.2012 15:59:30'
14.03.2012 15:59:30|1|64|Instrument='GC 04-12' Account='Sim101' Avg price=1647,6 Quantity=0 Market position=Short Operation=Remove Currency=Unknown
14.03.2012 15:59:30|1|32|Order='cf28b5d83f7b4b5d800a8f98457d1763/Sim101' Name='Profit target' New state=Cancelled Instrument='GC 04-12' Action=BuyToCover Limit price=1617,7 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:30|1|32|Order='ad99c260b3bb404c96d2ba7b2074095a/Sim101' Name='Stop loss' New state=Cancelled Instrument='GC 04-12' Action=BuyToCover Limit price=0 Stop price=1662,7 Quantity=1 Type=Stop Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:30|1|32|Order='adcf33423bc7473a8a61fb45a95cb005/Sim101' Name='Exit on close' New state=Accepted Instrument='CL 04-12' Action=BuyToCover Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:30|1|32|Order='adcf33423bc7473a8a61fb45a95cb005/Sim101' Name='Exit on close' New state=Working Instrument='CL 04-12' Action=BuyToCover Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:30|1|32|Order='adcf33423bc7473a8a61fb45a95cb005/Sim101' Name='Exit on close' New state=Filled Instrument='CL 04-12' Action=BuyToCover Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=1 Fill price=106,39 Error=NoError Native error=''
14.03.2012 15:59:30|1|16|Execution='b7c5e16ee8db44fd8d1597087aaf0063' Instrument='CL 04-12' Account='Sim101' Exchange=Default Price=106,39 Quantity=1 Market position=Long Operation=Insert Order='adcf33423bc7473a8a61fb45a95cb005' Time='14.03.2012 15:59:30'
14.03.2012 15:59:30|1|64|Instrument='CL 04-12' Account='Sim101' Avg price=106,39 Quantity=0 Market position=Short Operation=Remove Currency=Unknown
14.03.2012 15:59:30|1|32|Order='d88028f9b97e415aa24516e2cb508225/Sim101' Name='Profit target' New state=Cancelled Instrument='CL 04-12' Action=BuyToCover Limit price=103,6 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:30|1|32|Order='7de58f495ba54fc08d131b766132d514/Sim101' Name='Stop loss' New state=Cancelled Instrument='CL 04-12' Action=BuyToCover Limit price=0 Stop price=108,1 Quantity=1 Type=Stop Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:35|1|32|Order='fa7b7ee058bd4fb68b73c93d411a0be7/Sim101' Name='Short' New state=PendingSubmit Instrument='GC 04-12' Action=SellShort Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:35|1|32|Order='fa7b7ee058bd4fb68b73c93d411a0be7/Sim101' Name='Short' New state=Accepted Instrument='GC 04-12' Action=SellShort Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:35|1|32|Order='fa7b7ee058bd4fb68b73c93d411a0be7/Sim101' Name='Short' New state=Working Instrument='GC 04-12' Action=SellShort Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:35|1|32|Order='fa7b7ee058bd4fb68b73c93d411a0be7/Sim101' Name='Short' New state=Filled Instrument='GC 04-12' Action=SellShort Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=1 Fill price=1647,5 Error=NoError Native error=''
14.03.2012 15:59:35|1|16|Execution='7dd3be0205fe4fa7a64b7da9bcef5255' Instrument='GC 04-12' Account='Sim101' Exchange=Default Price=1647,5 Quantity=1 Market position=Short Operation=Insert Order='fa7b7ee058bd4fb68b73c93d411a0be7' Time='14.03.2012 15:59:35'
14.03.2012 15:59:35|1|64|Instrument='GC 04-12' Account='Sim101' Avg price=1647,5 Quantity=1 Market position=Short Operation=Insert Currency=Unknown
14.03.2012 15:59:35|1|32|Order='8e9e55fff17b45aab19bb511e1acb3b6/Sim101' Name='Stop loss' New state=PendingSubmit Instrument='GC 04-12' Action=BuyToCover Limit price=0 Stop price=1662,5 Quantity=1 Type=Stop Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:35|1|32|Order='39c519654599404bb2b678932e1a65f7/Sim101' Name='Profit target' New state=PendingSubmit Instrument='GC 04-12' Action=BuyToCover Limit price=1617,5 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:35|1|32|Order='8e9e55fff17b45aab19bb511e1acb3b6/Sim101' Name='Stop loss' New state=Accepted Instrument='GC 04-12' Action=BuyToCover Limit price=0 Stop price=1662,5 Quantity=1 Type=Stop Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:35|1|32|Order='39c519654599404bb2b678932e1a65f7/Sim101' Name='Profit target' New state=Accepted Instrument='GC 04-12' Action=BuyToCover Limit price=1617,5 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:35|1|32|Order='39c519654599404bb2b678932e1a65f7/Sim101' Name='Profit target' New state=Working Instrument='GC 04-12' Action=BuyToCover Limit price=1617,5 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:38|1|32|Order='e182b2cf41e74b27a5ab41e78e0c0d8a/Sim101' Name='Short' New state=PendingSubmit Instrument='CL 04-12' Action=SellShort Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:38|1|32|Order='e182b2cf41e74b27a5ab41e78e0c0d8a/Sim101' Name='Short' New state=Accepted Instrument='CL 04-12' Action=SellShort Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:38|1|32|Order='e182b2cf41e74b27a5ab41e78e0c0d8a/Sim101' Name='Short' New state=Working Instrument='CL 04-12' Action=SellShort Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:38|1|32|Order='e182b2cf41e74b27a5ab41e78e0c0d8a/Sim101' Name='Short' New state=Filled Instrument='CL 04-12' Action=SellShort Limit price=0 Stop price=0 Quantity=1 Type=Market Filled=1 Fill price=106,35 Error=NoError Native error=''
14.03.2012 15:59:38|1|16|Execution='2fa240716f4e4fde9fb29a594776f67d' Instrument='CL 04-12' Account='Sim101' Exchange=Default Price=106,35 Quantity=1 Market position=Short Operation=Insert Order='e182b2cf41e74b27a5ab41e78e0c0d8a' Time='14.03.2012 15:59:38'
14.03.2012 15:59:38|1|64|Instrument='CL 04-12' Account='Sim101' Avg price=106,35 Quantity=1 Market position=Short Operation=Insert Currency=Unknown
14.03.2012 15:59:38|1|32|Order='21249fc81ba74cb08fe45ff438e792e6/Sim101' Name='Stop loss' New state=PendingSubmit Instrument='CL 04-12' Action=BuyToCover Limit price=0 Stop price=107,85 Quantity=1 Type=Stop Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:38|1|32|Order='27796f2cd14149dba6078b6fa45a27f2/Sim101' Name='Profit target' New state=PendingSubmit Instrument='CL 04-12' Action=BuyToCover Limit price=103,35 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:38|1|32|Order='21249fc81ba74cb08fe45ff438e792e6/Sim101' Name='Stop loss' New state=Accepted Instrument='CL 04-12' Action=BuyToCover Limit price=0 Stop price=107,85 Quantity=1 Type=Stop Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:38|1|32|Order='27796f2cd14149dba6078b6fa45a27f2/Sim101' Name='Profit target' New state=Accepted Instrument='CL 04-12' Action=BuyToCover Limit price=103,35 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
14.03.2012 15:59:38|1|32|Order='27796f2cd14149dba6078b6fa45a27f2/Sim101' Name='Profit target' New state=Working Instrument='CL 04-12' Action=BuyToCover Limit price=103,35 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''

Follow me on Twitter Started this thread Reply With Quote




Last Updated on March 14, 2012


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts