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

Ninja script is not executing on live market or market replay

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

    Ninja script is not executing on live market or market replay

    Hello, I have a script that I ran in backtest and it produced results. However when I enable the strategy on live data or market replay, it still shows the trades it would have taken previously, but from that point on it does not enter any positions.
    The strategy is set to calculate OnPriceChange, using Cumulative Delta, Donchian Channel, and Volume as indicators. All the logic is set under OnMarketData, and I am not using OnBarUpdate in this case. I also use High, Low and Close values.
    Could you please help me? What could make the code run in backtest but not in live data. Thanks for the help in advance

    #2
    Hello, thanks for writing in. The best tool to use to debug this is the Print command. This will show you why a strategy is not running by printing out the data the strategy is reading:



    The reason a strategy might take trades on a backtest but not live data are numerous, it comes down to analyzing if your entry conditions are becoming true and checking if entry methods are actually being reached in code.
    Chris L.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by StockTrader88, 03-06-2021, 08:58 AM
    45 responses
    3,991 views
    3 likes
    Last Post johntraderuser2  
    Started by TAJTrades, Today, 09:46 AM
    0 responses
    7 views
    0 likes
    Last Post TAJTrades  
    Started by rhyminkevin, Yesterday, 04:58 PM
    5 responses
    62 views
    0 likes
    Last Post dp8282
    by dp8282
     
    Started by realblubb, Today, 09:28 AM
    0 responses
    8 views
    0 likes
    Last Post realblubb  
    Started by AaronKoRn, Yesterday, 09:49 PM
    1 response
    19 views
    0 likes
    Last Post Rikazkhan007  
    Working...
    X