Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

flatten

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

    flatten

    Friends,
    I am having problems with the flatten method. I have enclosed a cut down version of the template for it, excluding entry and exit logic. It works perfect up to point where it is flatten the instrument. it ignores the flatten method all together Printing it has reached the target price, and keeps going. What am I missing?
    John
    Attached Files

    #2
    Hello JLSwin,

    It is likely that you used lowercase letters for es in Mes. Its MES as the instrument name.

    To flatten the strategy you should actually just use exit orders for whatever position you are in rather than the accounts flatten method, that would allow the strategies performance to accurately reflect what happened.

    Comment


      #3
      Thanks, That was the problem all along.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      47 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      23 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      33 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      51 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