Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy is running on historical data but not on live bars on demo account

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

    Strategy is running on historical data but not on live bars on demo account

    Hello,

    I would like to ask you, what could be wrong with the source code of strategy when it is correctly working on historical data but it is not working on live bars..?

    I thought that when I am running strategy on historical data it is the same like when I am running strategy on live bars on demo account but faster...

    I attachement is the source code of the strategy I am not sure if it is any bug of NinjaTrader or it is any bug in my strategy source code - but as I told - it is correctly working on historical data so I guess there is no bug in my source code..

    Thank you for your help

    btw: the strategy is created for CL market but also on NQ market was not working.
    The problem is that the strategy is not entering.. it looks like the code was not even called - there was not called method EnterLong but it should.
    On historical data when should be called this method it really was called.
    Attached Files

    #2
    zooinek, are there any errors in the logs (right-most tab of Control Center)? You can set TraceOrders = true in the Initialize() section for further information about why an order could've been rejected.

    Unfortunately it looks like you will have to get down and dirty with debugging this strategy due to the complexities present (helper methods, code not in english, etc). I recommend using plenty of Print() statements to make sure everything is happening as it should.

    Also, you may want to break down the strategy to a much simpler form that actually works as it should, and then layer on the rest of your strategy until you find where it breaks.
    AustinNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    70 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    42 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    24 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    27 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    54 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X