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 00nevest, Today, 02:27 PM
      0 responses
      0 views
      0 likes
      Last Post 00nevest  
      Started by Jonafare, 12-06-2012, 03:48 PM
      5 responses
      3,986 views
      0 likes
      Last Post rene69851  
      Started by Fitspressorest, Today, 01:38 PM
      0 responses
      2 views
      0 likes
      Last Post Fitspressorest  
      Started by Jonker, Today, 01:19 PM
      0 responses
      2 views
      0 likes
      Last Post Jonker
      by Jonker
       
      Started by futtrader, Today, 01:16 PM
      0 responses
      9 views
      0 likes
      Last Post futtrader  
      Working...
      X