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

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.

    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks, That was the problem all along.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by AaronKoRn, Today, 09:49 PM
      0 responses
      2 views
      0 likes
      Last Post AaronKoRn  
      Started by carnitron, Today, 08:42 PM
      0 responses
      8 views
      0 likes
      Last Post carnitron  
      Started by strategist007, Today, 07:51 PM
      0 responses
      9 views
      0 likes
      Last Post strategist007  
      Started by StockTrader88, 03-06-2021, 08:58 AM
      44 responses
      3,975 views
      3 likes
      Last Post jhudas88  
      Started by rbeckmann05, Today, 06:48 PM
      0 responses
      9 views
      0 likes
      Last Post rbeckmann05  
      Working...
      X