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

SampleATMStrategy

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

    SampleATMStrategy

    Hi,
    Am unable to run SampleATMStrategy and open any trade. Error code returned by atmCallbackErrorCode is Panic.

    Any special setup needs to be done to run this strategy, or is it a bug with AtmStrategyCreate function? If yes any workaround.

    Regards

    Vivek

    #2
    Hello AnkaS,

    Thank you for your post.

    There should be no work around as this should work without that message.

    Please send us your log and trace files by going to Help > Email Support in the NinjaTrader 8 Control Center. Make sure to list 'ATTN: Patrick H' in the subject line and reference this thread in the body of email.

    Comment


      #3
      E-Mailed the log and Trace files

      Comment


        #4
        Hi,
        Any update?

        See the following line in the log file - "|Unable to load ATM strategy template from file 'C:\Users\lenovo\Documents\NinjaTrader 8\templates\AtmStrategy\AtmStrategyTemplate.xml':

        Comment


          #5
          Hello,

          Thank you for posting the error details.

          There is actually one step required for this script to work, that is to create the testing template it uses.

          In a Chart trader or Superdom window, create a new ATM strategy and provide some settings for it. Save that ATM with a name of: "AtmStrategyTemplate" and then re apply the SampleATMStrategy.

          This should correct the error you are seeing and allow you to run this script in realtime.

          I look forward to being of further assistance.
          JesseNinjaTrader Customer Service

          Comment


            #6
            Hello AnkaS,

            Thanks for your post.

            We have just replied via e-mail.

            Sorry for the delay.
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              Hi,
              Thanks, after creating the template the got the sample strategy working.

              Another query, is there a way to set / change the order quantity for an order created through AtmStrategyCreate().

              Regards

              Vivek

              Comment


                #8
                Hi,
                Another query, what is the order name to be used with the function -
                AtmStrategyChangeStopTarget(TakeProfit, StopLoss, "STOP1", AtmStrategyId);

                Regards

                Vivek

                Comment


                  #9
                  Hello,

                  The order quantity would be controlled by the template. Aside from changing the template its self, there would not be a programmatic way to do this.

                  If you know that you will use a range of quantities such as 1, 2 ,3 ,4 ,5, you could create 5 templates and then change the template used depending on what quantity should be used.

                  The name of the Target would be just that, the Name plus number of the target in all caps as shown. You can take note of the targets number in the ATM strategy window when you are configuring the template.



                  I look forward to being of further assistance.
                  JesseNinjaTrader Customer Service

                  Comment


                    #10
                    Howdy Jesse - I have the SampleAtmStrategy and it ask that I also have AtmStrategyTemplate which I do not have. How can I get an explanation of how this strategy works and general documentation on this strategy. Where can I find the template? Thanks in advance.

                    Comment


                      #11
                      Hello,

                      Thank you for the post.

                      The Template "AtmStrategyTemplate" is an item you would need to create on your end before running the strategy. You can make the template however you want, mainly it just needs the name "AtmStrategyTemplate".

                      Regarding directions, this would be the comments in the script its self. You can find documentation on the NinjaScript syntax used in the help guide depending on what you wanted help for.

                      For the ATM strategy methods, you can find those here: http://ninjatrader.com/support/helpG...gy_methods.htm

                      Otherwise, this script would be used like any other strategy in regard to how you enable and apply it. It would need Realtime data to produce orders as ATM strategies are not meant for historical orders.

                      I look forward to being of further assistance.
                      JesseNinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by ct, 05-07-2023, 12:31 PM
                      6 responses
                      202 views
                      0 likes
                      Last Post wisconsinpat  
                      Started by kaywai, Today, 06:26 AM
                      1 response
                      2 views
                      0 likes
                      Last Post kaywai
                      by kaywai
                       
                      Started by kevinenergy, 02-17-2023, 12:42 PM
                      118 responses
                      2,778 views
                      1 like
                      Last Post kevinenergy  
                      Started by briansaul, Today, 05:31 AM
                      0 responses
                      9 views
                      0 likes
                      Last Post briansaul  
                      Started by traderqz, Yesterday, 12:06 AM
                      11 responses
                      28 views
                      0 likes
                      Last Post NinjaTrader_Gaby  
                      Working...
                      X