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

ATM quantity

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

    ATM quantity

    Hey,
    1. Is it possible to change number of contracts within ATM strategy? Automatically, without chart trader.
    2. Is it possible to call indicator within a strategy with default parameters (which set OnStateChange if (State == State.SetDefaults)) so I don't need to send parameters everytime I ask indicator's value?


    #2
    3. How to hide profit/loss on the chart when I use chart trader?

    Comment


      #3
      Hello Leeroy_Jenkin,

      While there is no guarantee the value will be set when you expect, the object itself can be found through the AutomationID.

      Below is a link to an example with undocumented code that demonstrates.


      The default parameters will be loaded only when creating a new instance of the indicator.
      Yes, you are able to set the initial default value for new instances of indicators when they are first added by setting the value in State.SetDefaults.


      Once instance is added, the user selected settings would be used from then on. These would be saved in the workspace. These can also be saved in a chart template.


      The position entry marker cannot be removed from the chart.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        Ok, thanks.
        I got ATM strategy based on SampleATMStrategy. Ofc I have ATM template which this strategy uses. By default it has 1 contract. But what should I do if I wanna trade 2 contracts once? Why It's still places 1 contract order even if on chart trader I set 2? Saving by default is only solution to change it?

        Comment


          #5
          By default quantity I mean this value:
          Attached Files

          Comment


            #6
            Hello Leeroy_Jenkins,

            I am not aware of any way to set the default quantity for the Atm Strategy Template window.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              The question here is why "Order qty" from chart trader doesn't affect quantity of traded contracts by programmed ATM strategy (SampleATMStrategy)?

              Comment


                #8
                Hello Leeroy_Jenkins,

                The quantity in the Atm Strategy Template window is meant to be set and saved with the Atm Strategy Template. When re-opening the template, the template will be controlling that quantity input, not the Chart Trader.

                When an Atm Strategy Template is selected from the drop-down, the quantity saved in the template will be loaded in Chart Trader in the Quantity selector.

                Chart Trader does not affect NinjaScript Strategies in any way. It doesn't affect the account. It doesn't affect the quantity. Chart Trader is completely separate and does not affect NinjaScript Strategies.
                Chelsea B.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Barry Milan, Today, 10:35 PM
                1 response
                8 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Started by WeyldFalcon, 12-10-2020, 06:48 PM
                14 responses
                1,428 views
                0 likes
                Last Post Handclap0241  
                Started by DJ888, Yesterday, 06:09 PM
                2 responses
                9 views
                0 likes
                Last Post DJ888
                by DJ888
                 
                Started by jeronymite, 04-12-2024, 04:26 PM
                3 responses
                40 views
                0 likes
                Last Post jeronymite  
                Started by bill2023, Today, 08:51 AM
                2 responses
                16 views
                0 likes
                Last Post bill2023  
                Working...
                X