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 NullPointStrategies, Today, 05:17 AM
      0 responses
      20 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      119 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      63 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      41 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      45 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X