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 traderqz, Today, 12:06 AM
        2 responses
        3 views
        0 likes
        Last Post traderqz  
        Started by RideMe, 04-07-2024, 04:54 PM
        5 responses
        28 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by f.saeidi, Today, 08:13 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by DavidHP, Today, 07:56 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by kujista, Today, 06:23 AM
        3 responses
        11 views
        0 likes
        Last Post kujista
        by kujista
         
        Working...
        X