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

Running strategy in Real-Time

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

    Running strategy in Real-Time

    I am currently using a simulated account and I have completed the backtesting part of my strategy. Now I want to do real-time testing only in my simulated account. Is there a way to tell the strategy not to make any trades with historical information as the strategy gets executed for the first time? I just want to take trades based on real-time data.

    If there is no such parameter or method, which is the start behavior that always guarantees for the strategy to be in synch by the time is evaluating the real-time data? I am currently using Immediately submit, synchron... The way I understand this parameter setting is that when starting the strategy and evaluating historical data, if the strategy has an open position by the time it gets to the real-time data, it will submit a closing trade so that the strategy is in synch with the account (assuming the account did not have any open trades before the strategy was initiated).

    Thanks,
    Javier

    #2
    Hello GARZONJ,

    Thanks for your post.

    You can skip historical processing in your strategy by adding if (State == State.Historical) return; to the top of your OnBarUpdate method.

    Immediately Submit is used when you know the account is where you want it when enabling the strategy. This is useful for having a strategy match historical orders against live working orders so if you disable the strategy, you can enable it so it resumes. Synchronize Account is an additional setting that submits an order to the account to sync it with the position of strategy.

    For the thread's reference, documentation on start behaviors can be found here - https://ninjatrader.com/support/help..._positions.htm

    We look forward to being of further assistance.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by MacDad, 02-25-2024, 11:48 PM
    7 responses
    158 views
    0 likes
    Last Post loganjarosz123  
    Started by Belfortbucks, Today, 09:29 PM
    0 responses
    7 views
    0 likes
    Last Post Belfortbucks  
    Started by zstheorist, Today, 07:52 PM
    0 responses
    7 views
    0 likes
    Last Post zstheorist  
    Started by pmachiraju, 11-01-2023, 04:46 AM
    8 responses
    151 views
    0 likes
    Last Post rehmans
    by rehmans
     
    Started by mattbsea, Today, 05:44 PM
    0 responses
    6 views
    0 likes
    Last Post mattbsea  
    Working...
    X