Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

atmstrategyclose

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

    atmstrategyclose

    Hello,

    I work with my script-strats, my atm-strats, both together as well and everything works fine with NinjaTrader - thanks to your support

    Today I wanted to add "atmstrategyclose" but in the helpguide I only find as condition "...profitloss" and "idValue". Isn´t it possible to use atmstrategyclose with certain conditions in the strategy instead of only GetAtmStrategyUnrealizedProfitLoss("idValue") > xxx)? And what would be the idValue in this case? When I do AtmStrategyClose("mS1"); //mS1 is the stratId in the variables section for creating the getatm it doesn´t close.

    Or to flatten somehow all positons of an instrument from getatm? (Because with NinjaTrader.Gui.SuperDom.SuperDom.FlattenEverythin g(); there are closed all positions from all instruments - which I dont want)



    Thanks
    Tony
    Last edited by tonynt; 12-05-2011, 05:51 PM. Reason: typing error - sorry

    #2
    Hello,

    Yes, you can use AtmStrategyClose with other conditions. The example in the help guide was just one way you can use it.

    The IDvalue will by the ATM Strategy ID you wish to close.

    A NinjaScript strategy would only be able to close it's own position. There is not a method to close all positions on the same instrument - they would all need to be placed from the same strategy.

    Please let me know if you have additional questions.
    MatthewNinjaTrader Product Management

    Comment


      #3
      Thanks, got it. Works!


      Originally posted by NinjaTrader_Matthew View Post
      Hello,

      Yes, you can use AtmStrategyClose with other conditions. The example in the help guide was just one way you can use it.

      The IDvalue will by the ATM Strategy ID you wish to close.

      A NinjaScript strategy would only be able to close it's own position. There is not a method to close all positions on the same instrument - they would all need to be placed from the same strategy.

      Please let me know if you have additional questions.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      71 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      43 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      25 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      28 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      56 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X