Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy - Live Vs Historical Orders

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

    Strategy - Live Vs Historical Orders

    Top of the Evening ...

    I have a strategy that is developed / back-tested and is ready to move forward into "production"

    I would like to use the strategy in real-time trading with my brokerage account.
    I need to ensure that only current session / live orders are submitted to the exchange.
    I would like to clarify the usage of two processes.

    1. Wait until flat before executing live - I have this enabled. (Tool / Options / Strategy )

    2. I have seen references to using a line of code within the OnBarUpdate() routine.
    if (Historical) return;

    - currently not implemented in my code.

    If needed ... I would implement in the following manner:

    private void SubmitOrder()
    {
    // called by OnBarUpdate() routine


    if (Historical)
    return;


    // ** Code to submit mkt limit orders ... etc.
    }

    I would like to know if both these options are required to load the strategy with a live account/market.

    The best of all worlds would be ... to allow the strategy to "chalk up" the prior trading sessions and then trade the current market/data stream live, as signaled.

    Is there anything else that I should be considering.

    Regards,
    L. Itter

    #2
    Originally posted by [email protected] View Post
    would like to know if both these options are required to load the strategy with a live account/market.

    The best of all worlds would be ... to allow the strategy to "chalk up" the prior trading sessions and then trade the current market/data stream live, as signaled.
    Hi there, if you have Wait Until Flat enabled and if your strategy is always flat at the end of the market day, your strategies will behave exactly like what you describe here.

    The Wait Until Flat feature, upon enabling a strategy, will run all the previous calculations inside OnBarUpdate() up to the current bar. Then it calculates a "virtual position" which your strategy will manage as if it was a real position until your strategy is flat, at which point the strategy will start sending real orders.

    Here is the link to the entry in the help guide for strategy position verse account position.
    AustinNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    558 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    545 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X