Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can the strategy be used for real trading?

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

    Can the strategy be used for real trading?

    When running strategy in demo account, for example running SampleMACrossOver strategy which exists after installing NinjaTrader, it suddenly create a lot of orders which trade for history bars. It's good because it can be used for back test. But can the strategy be used for real trading? For real trading, i don't want to create any orders for history bars, only want to create order for incoming new bar or new tick. How can i know it's new bar incoming or the history bars which just need to paint when getting OnBarUpdate() call? Thanks.

    #2
    Hello 51friend,

    You can add a statement to OnBarUpdate() that will allow the strategy to only run on live data.

    if (Historical)
    return;

    Clicking the link above will show you where this needs to go in the code. You cannot make changes to system strategies, but you can save a copy and modify from there. Click tools > Edit NinjaScript > Strategy > SampleMACrossover. Then Right Click and Select Save As to save a copy and make changes.
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    648 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    369 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    108 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    572 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    574 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X