Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy start behaviour

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

    Strategy start behaviour

    Hello,

    I have developed a strategy which I am using as a semi-automated trade execution system, almost like an advanced ATM Strategy.

    I only enable my strategy when I have identified that the correct market conditions exist i.e. I may only enable my strategy for part of the trading session, not leave it running autonomously throughout the full trading session.

    Within this strategy there are two conditions which will provide a signal bar, the strategy then structures the trade in accordance with my risk management plan embedded in my strategy.

    The issue I have is that say I enable my strategy at 11:30am, if the signal bar has occurred at say 11am prior to me enabling the strategy then the strategy would assume that I am already in a trade and my position is not flat. If a second signal bar occurs shortly after I have enabled the strategy at say 11:45am then the strategy will not place the trade as it will take the historical trade position and not the live condition.

    Is there a way to override the historical condition with the strategy assuming the next signal bar is a valid signal irrespective of if the historical position is flat or not?

    Thanks,

    Neil

    #2
    Hello burtoninlondon,

    You could add a condition to return for historical bars so no trades are placed historically. That would be:

    if(State == State.Historical) return;

    If you have other logic that needs to still calculate historically you could also add this type of condition to your entry condition, checking if the state is realtime.

    Comment


      #3
      Thanks NinjaTrader_Jesse that seems to work for me.

      Neil

      Comment

      Latest Posts

      Collapse

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