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

AddOn Development: autoselected ATM strategy

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

    AddOn Development: autoselected ATM strategy

    Hello everyone. Sometimes it's a distraction to apply an ATM strategy on a chart. I want to develop an Add On that applies an ATM strategy, exactly as the current functionality under Positions tab of the Control Center where the user basically selects the position > apply ATM strategy >[list of strategies].

    The function I found that I could use is StartATMStrategy() https://ninjatrader.com/support/help...gy_methods.htm

    The problem is this note:

    Critical: The "name" argument on the CreateOrder() method MUST be named "Entry" for the ATM Strategy to be started successfully.

    When the user manually opens a position the order's name is an empty string "", so obviously it gets rejected if I try to pass it on to StartATMStrategy().

    Also tried to modify the order's name, but didn't work. There must be a flag to void name modification or something.

    Any ideas of how I could achieve this?

    thanks!

    #2
    Hello merengano,

    Thank you for your post.

    You'd want to create your own button for the user to press that when pressed, submits an order using StartAtmStrategy() with the order name being Entry.

    An example of this may be found in our AddOn Framework NinjaScript Basic from this page of our help guide:



    The behavior of the buttons when pressed is around line 930 in the code there.

    Please let us know if we may be of further assistance to you.

    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Ok, that's a good example.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Segwin, 05-07-2018, 02:15 PM
      12 responses
      1,785 views
      0 likes
      Last Post Leafcutter  
      Started by poplagelu, Today, 05:00 AM
      0 responses
      3 views
      0 likes
      Last Post poplagelu  
      Started by fx.practic, 10-15-2013, 12:53 AM
      5 responses
      5,407 views
      0 likes
      Last Post Bidder
      by Bidder
       
      Started by Shai Samuel, 07-02-2022, 02:46 PM
      4 responses
      98 views
      0 likes
      Last Post Bidder
      by Bidder
       
      Started by DJ888, Yesterday, 10:57 PM
      0 responses
      8 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Working...
      X