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 burtoninlondon, Today, 12:38 AM
    0 responses
    5 views
    0 likes
    Last Post burtoninlondon  
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    12 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Yesterday, 08:42 PM
    0 responses
    11 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Yesterday, 07:51 PM
    0 responses
    13 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,982 views
    3 likes
    Last Post jhudas88  
    Working...
    X