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 sjsj2732, Yesterday, 04:31 AM
    0 responses
    38 views
    0 likes
    Last Post sjsj2732  
    Started by NullPointStrategies, 03-13-2026, 05:17 AM
    0 responses
    287 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    289 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    134 views
    1 like
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    95 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Working...
    X