NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 12-08-2009, 08:27 AM   #1
spinalwiz
Member
 
Join Date: Oct 2008
Posts: 60
Thanks: 0
Thanked 0 times in 0 posts
Default Strategy not executing due to backtest data

Hi,

Im sure this is simple but couldnt find the answer

When I enable a strategy on a chart it paints on the calculated historical performance of the strategy based on what would have happened.

It currently says the strategy would have gone long 5 days ago.

The issue is that if I now want to start the strategy for real it wont go long as I have entriesperdirection set to 1 and the fake entry from 5 days ago seems to be stopping it.

If I set Tools->Options->Strategies->Immediately submit live working historical orders it will indeed submit an order.

My concern is though - I dont want it to submit the order unless the strategy is currently in a GO LONG situation, regardless of it thinks it should be long from 5 days ago.


Or perhaps another way of asking - how do I set the strategy to be real time only and ignore all fake historical actions?
spinalwiz is offline  
Reply With Quote
Old 12-08-2009, 08:56 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,555
Thanks: 261
Thanked 1,013 times in 994 posts
Default

spinalwiz, to execute the first real time generated entry signal please work with 'WaitUntilFlat' as option to start your strategy realtime.

To start processing any trade triggering conditions only if you start the strategy live on realtime data, add this to the OnBarUpdate() start -

if (Historical) return;
NinjaTrader_Bertrand is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Strategy not executing in real time drolles Strategy Development 8 08-10-2009 03:59 PM
Strategy trades not executing bluelou Automated Trading 1 06-22-2009 07:00 AM
Error connecting to data provider due to strategy molecool Strategy Development 3 04-15-2009 02:47 PM
Strategy not executing egonline Strategy Development 4 04-17-2008 01:47 AM
Strategy executing order twice SamIam Strategy Development 2 08-29-2007 06:43 PM


All times are GMT -6. The time now is 05:25 PM.