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

Strategy is enabled and showing up with a yellow color in the Control Center

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

    Strategy is enabled and showing up with a yellow color in the Control Center

    Hi,

    My strategy is showing up with a yellow color in the Control Center and after checking I noticed that StartBehavior = waitUntilFlat. I can see that Quantity=1 and NO orders are active.
    To get it to run (green color), I have to change StartBehavior to Immediately...
    Am I missing something ? What is considered FLAT ?

    Thank you.
    Anthony

    #2
    Hello Anthony_0709,

    Thank you for your post.

    Your position is considered flat when there are no open positions.

    When a strategy is yellow (or orange) in the Strategies tab of the Control Center, this means that the strategy entered a historical (virtual) position in the historical data that has been loaded and that you have "Wait until flat" selected for the 'Start behavior' option in the strategy parameters.

    When a strategy is enabled, it processes historical data to determine trades that the strategy would have made on the data that is already on the PC/chart and to determine what position the strategy is in. (Strategy positions are separate from actual Account positions).

    Once the strategy has finished processing the historical data and has transitioned to real-time, 'Wait Until Flat' will wait until there is a real-time order submission that will cause the strategy to become flat. All positions must be flat before real-time orders will begin.

    If you do not want the strategy to calculate a position from processing historical data, you could add if (State == State.Historical) return; to the top of your strategy logic so historical processing is skipped. The strategy will then always start from a flat position because it has not calculated any orders.

    Please see the help guide links below for more information about Start Behavior and Strategy vs Account Position.

    Strategy vs. Account Position — https://ninjatrader.com/support/help..._account_p.htm

    Start Behaviors — https://ninjatrader.com/support/help..._positions.htm

    Additionally, more information may be found in this forum post - https://ninjatrader.com/support/foru...ion#post811541

    Let us know if we may assist further.
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      Hi folks. What is the difference of Immediate Submit and Immediate Submit, synchronize? Also, with Slippage settings on a realtime live strategy is that allowing slippage up to 2 (and is that 2 ticks etc)? See https://www.screencast.com/t/rgtctYvQL Thanks folks. Greg

      Comment


        #4
        Hello birdog,

        The slippage setting is only used for backtests to simulate slippage, a live market has slippage based on the exchange and how the order fills in the market.

        In regard to the start behaviors the main difference would be the following bullet points frrom the help guide. I bolded the relevant difference in wording between the two.


        Immediately submit
        • Any remaining active strategy orders that cannot be successfully paired will be submitted live and the strategy will begin managing your Strategy Position assuming your Account Position is in sync with it.
        Immediately submit, synchronize account
        • Any remaining active strategy orders that cannot be successfully paired will be submitted live and the strategy will then try to sync your Account Position to your Strategy Position through the process below.
        • After the strategy is successful in cancelling and submitting any orders that required action it will check your current Account Position and compare it to your Strategy Position. On multi-instrument strategies it will perform this check for all instruments used by the strategy.
        • If the Account Position matches your Strategy Position, no reconciliatory order will be submitted. The strategy will then begin managing your Strategy Position immediately.
        • If the Account Position does not match your Strategy Position, NinjaTrader will submit a market order(s) to reconcile the Account Position to match your Strategy Position. The strategy will then begin managing your Strategy Position immediately.

        synchronize account will submit orders to make the account position match your strategy position.

        https://ninjatrader.com/support/help...ighlightsub=sy nc
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by algospoke, Yesterday, 06:40 PM
        2 responses
        19 views
        0 likes
        Last Post algospoke  
        Started by ghoul, Today, 06:02 PM
        3 responses
        14 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by jeronymite, 04-12-2024, 04:26 PM
        3 responses
        45 views
        0 likes
        Last Post jeronymite  
        Started by Barry Milan, Yesterday, 10:35 PM
        7 responses
        20 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by AttiM, 02-14-2024, 05:20 PM
        10 responses
        180 views
        0 likes
        Last Post jeronymite  
        Working...
        X