Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy shows I'm in a position but I shouldn't be

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

    Strategy shows I'm in a position but I shouldn't be

    My strategy is showing that I'm in a position but I'm not. Usually happens at beginning of the day. How do I reset the strategy at beginning of day maybe? Or any other thoughts?

    Thanks.

    Attached Files

    #2
    Hello elcowen,

    Thank you for your post.

    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

    Let us know if we may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    45 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    31 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X