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

Exiting and Re-Entering a Strategy

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

    Exiting and Re-Entering a Strategy

    Will you please explain the Strategy logic that takes place if I exit and then re-enter a strategy when connected on-line.

    1. Exit: Will current trades be closed?
    2. Re-Enter/Re-Start: The strategy seems to process the history but does not execute any orders - correct?
    3. Re-Enter/Re-Start: If the History ended with a BUY and then the real-time processing begins will NT skip the next SELL (in real-time) since it relates to the previous BUY (history) which was not executed as it occurred before the real-time session began?


    Thanks.


    #2
    imported post

    Guym,

    1. Ifyou have a strategy running with an open position and you terminate it will leave the position open and optionally cancel any working orders depending on your Tools > Options > Strategies >NinjaScript > Order handling settings.

    2. If you restart, the strategy will calculateits current state based on historical data and either:

    a) Wait until flat beforeexecuting an live orders or;
    b) Immediately submit live orders

    Depending on options in Tools > Options > Strategies > NinjaScript > "On starting a real-time strategy"

    Any open position calculated by the strategy is not reconciled with your live account so if the strategy is long 1 and your account is flat, you have to then manually open a position to sync the two together. These

    3) Depends on the settings above.

    Ray
    RayNinjaTrader Customer Service

    Comment


      #3
      imported post

      Thanks - this helps a lot.

      under Options->Strategies->Ninjascript

      does the "Wait until flat before executing live" option mean that the Ninjascript code waits until flat before it starts executing or does it mean that an order generated by the Ninjascript code will be ignored until flat?

      Comment


        #4
        imported post

        It means that the strategy will run against real-time data but think its still historical, historical orders are not processed as live, but still historically. Once the strategy goes flat, then the next generated entry order will go live.

        Ray
        RayNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by yertle, Yesterday, 08:38 AM
        7 responses
        28 views
        0 likes
        Last Post yertle
        by yertle
         
        Started by bmartz, 03-12-2024, 06:12 AM
        2 responses
        21 views
        0 likes
        Last Post bmartz
        by bmartz
         
        Started by funk10101, Today, 12:02 AM
        0 responses
        5 views
        0 likes
        Last Post funk10101  
        Started by gravdigaz6, Yesterday, 11:40 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by MarianApalaghiei, Yesterday, 10:49 PM
        3 responses
        11 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Working...
        X