Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATM in ninja script strategy

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

    ATM in ninja script strategy

    Hi,
    I would like to ask, if it is possible to call my custom ATM strategy in ninja script strategy.

    I didnt find it in wizard-so is there some piece of code, which can do this?

    Thank you

    #2
    Yes, this is possible but not from the Strategy Wizard. You will have to manually program this. Doing this is advanced and you can take a look at the sample code. Within the Control Center, select Tools > Edit NinjaScript > Strategy and open the SampleATM... strategy.
    RayNinjaTrader Customer Service

    Comment


      #3
      OH! Great-its just what Ive been searching for!

      Comment


        #4
        Setting a time when order is in game

        And one more question-when a set of conditions activates a stop market order for example 1point up from last high-how to set this order stays in market for next 2bars and than it will disappear?

        Thank you

        Comment


          #5
          Hello,

          You will need to resubmit the order every bar to keep it working, therefore all you have to do is not submit it when you want it to go away.
          DenNinjaTrader Customer Service

          Comment


            #6
            And back to ATM in strategy-is in version 7 possibility to use the ATM through the strategy for backtesting?
            Not in data replay,but in the strategy optimizer?

            Thanks

            Comment


              #7
              lukaskuta, unfortunately it is still not possible to use ATM strategies with the optimizer or backtester.
              AustinNinjaTrader Customer Service

              Comment


                #8
                Help please....

                Does anyone there who could help me in this problem? I have already build a ATM template in the Super Dom and I call it to a ninja script strategy and then when I try to backtest it, it will return nothing. Here is my code:

                if (CrossAbove(SMA(SMA1), SMA(SMA2), 1) && orderIdL.Length == 0 && atmStrategyIdL.Length == 0)
                {
                atmStrategyIdL = GetAtmStrategyUniqueId();
                orderIdL = GetAtmStrategyUniqueId();
                orderBarL = CurrentBar;
                AtmStrategyCreate(Cbi.OrderAction.Buy, OrderType.Market, 0, 0, TimeInForce.Day, orderIdL, "CL Scalp", atmStrategyIdL);
                }
                else if (CrossBelow(SMA(SMA1), SMA(SMA2), 1) && orderIdS.Length == 0 && atmStrategyIdS.Length == 0 )
                {
                atmStrategyIdS = GetAtmStrategyUniqueId();
                orderIdL = GetAtmStrategyUniqueId();
                orderBarS = CurrentBar;
                AtmStrategyCreate(Cbi.OrderAction.Sell, OrderType.Market, 0, 0, TimeInForce.Day, orderIdS, "CL Scalp", atmStrategyIdS);
                }
                Thanks in advance...

                Comment


                  #9
                  luxurious_04, calling ATM's for exit management will only work in realtime or Market Replay, it will not work unfortunately in backtesting.

                  Comment


                    #10
                    A very big thanks for that information you've given. How do I add strategy in a market replay? One more thing calling ATM template can be used for entry management? Confuse..
                    Last edited by luxurious_04; 08-26-2010, 02:35 AM.

                    Comment


                      #11
                      1. Record the Market Replay data needed

                      2. Set up your chart

                      3. Right click in it and add your NinjaScript strategy calling the ATM's for managing the trades.





                      In our NT7 beta release the market replay data is prerecorded by us on the servers, so you can just download and use it for replay.

                      Comment


                        #12
                        Help please

                        Thanks Bertran, Can you give me the root folder or path of the ATM strategy template which I created in the Dom?

                        Comment


                          #13
                          Those templates are stored in the database luxurious_04, which would be included in the backup file if you choose to build one.

                          Comment


                            #14
                            Thanks Bertran, a follow up question, can I access it for I want to select what ATM template to be used in the AtmStrategyCreate method?.What folder then I will be the one to browse.

                            Comment


                              #15
                              Unfortunately this is not 'browsable' from inside your NinjaScript strategy, you would just hardcode in which template to use or you could for example setup a string input for the user and then use this as variable in the AtmStrategyCreate().

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              649 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              370 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              109 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              573 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              576 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X