Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Strategy not executing due to backtest data

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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?

    #2
    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;
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by llanqui, Today, 10:29 AM
    0 responses
    2 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by llanqui, Today, 08:32 AM
    1 response
    8 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by lollers, Yesterday, 03:26 AM
    1 response
    53 views
    0 likes
    Last Post lollers
    by lollers
     
    Started by Salahinho99, 05-05-2024, 04:13 AM
    7 responses
    62 views
    0 likes
    Last Post Salahinho99  
    Started by knighty6508, 05-10-2024, 01:20 AM
    4 responses
    30 views
    0 likes
    Last Post knighty6508  
    Working...
    X