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

GetATM

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

    GetATM

    Hello,

    when using the NT-AtmStrategyTemplate and changing "AtmStrategyTemplate" to the name of an existing ATM template, following the instructions in the script, after enabling the SampleAtmStrategy I get in output window the messages

    " **NT** GetAtmStrategyMarketPosition() method error: AtmStrategyId '54f66ba6e1fd427fb27144d8a8cba861' does not exist"
    ....

    What else is to change or add please?

    Thank you
    Tony

    #2
    Hello tonynt,

    Thank you for your post.

    If all you changed was the template name and the name is correct then there should be no issue here.

    Can you attach a screenshot of the ATM Strategy as saved in the SuperDOM or Chart Trader Manage ATM Strategies menu?

    In addition, can you provide the line of code form the sample with your change so I may review on my end?

    I look forward to your response.

    Comment


      #3
      Hello Patrick,

      thank you for your reply. Please see attached all infos.

      (in line 30 I added the script name instead of string.empty because of the messages, but still the same)

      When going over the help guide with ATM Strategy Methods there appears another question now please:

      AtmStrategyChangeEntryOrder(GetCurrentBid(), 0, "orderIdValue");

      Do I have to set an "orderIdValue" or is this by NT automatically?
      (because it doesn´t change the limit)

      Thank you for your support.
      Tony
      Attached Files
      Last edited by tonynt; 07-18-2017, 09:52 AM. Reason: translation error, clearifying

      Comment


        #4
        Get ATM script differences

        Hello,

        I want to add an ATM to a script

        In the sampleatmstrategy script I see the following:


        ... GetAtmStrategyMarketPosition(atmStrategyId) == Cbi.MarketPosition.Flat)

        and

        ... GetAtmStrategyMarketPosition(atmStrategyId) == MarketPosition.Flat)


        and in the help guide:

        ... GetAtmStrategyMarketPosition("id") == MarketPosition.Flat ...


        What is the difference between these 3 lines?


        Thanks in advance.

        Comment


          #5
          Hello tonynt,

          Thank you for your response.

          The means in which you set the orderId and atmStrategyId are correct, from what I see. May we test the strategy on our end?

          You can attach your strategy to your response by going to File > Utilities > Export NinjaScript > Export selected source files > select your strategy > select the right arrow > Export. The file will be located under (My) Documents\NinjaTrader 7\bin\Custom\ExportNinjaScript.

          I look forward to assisting you further.

          Comment


            #6
            Hello jackomulligan,

            Thank you for your post.

            Cbi.MarketPosition.Flat is the same call as MarketPosition.Flat.

            The use of "id" in the Help Guide for GetAtmStrategyMarketPosition("id") is to illustrate it is simply a string for the id.

            Please let me know if you have any questions.

            Comment


              #7
              Hello,

              when using in my script same logic as the sampleatmstrategy I always get the error message in output window and logtab "GetAtmStrategyMarketPosition' method error: ATM strategy ID 'a14d63f8bbf24672a1c7931bebdd3f80' does not exist"

              From one of the threads about this topic I found http://ninjatrader.com/support/forum/showthread.php?t=85996 I understand that with every "getatm..." I have to do before "if (atmStrategyId.Length > 0). Yes?

              Thank you
              Tony

              Comment


                #8
                Hello Tony,

                Thank you for your response.

                Correct, if you are going to pass the Id string you need to ensure it exists with atmStrategyId.Length > 0.

                Please let me know if you have any questions.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Aviram Y, Today, 05:29 AM
                0 responses
                1 view
                0 likes
                Last Post Aviram Y  
                Started by quantismo, 04-17-2024, 05:13 PM
                3 responses
                25 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Started by ScottWalsh, 04-16-2024, 04:29 PM
                7 responses
                34 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Started by cls71, Today, 04:45 AM
                0 responses
                6 views
                0 likes
                Last Post cls71
                by cls71
                 
                Started by mjairg, 07-20-2023, 11:57 PM
                3 responses
                216 views
                1 like
                Last Post PaulMohn  
                Working...
                X