• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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 superkolleech, Today, 12:46 AM
    1 response
    10 views
    0 likes
    Last Post MojoJojo  
    Started by davidwade, Today, 02:51 AM
    0 responses
    2 views
    0 likes
    Last Post davidwade  
    Started by aviat72, 04-26-2020, 09:41 PM
    10 responses
    90 views
    0 likes
    Last Post kissandfly  
    Started by healthooa, Today, 01:28 AM
    0 responses
    7 views
    0 likes
    Last Post healthooa  
    Started by harjinderjit, Yesterday, 08:24 PM
    0 responses
    20 views
    0 likes
    Last Post harjinderjit  
    Working...
    X