Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Calling an ATM Strategy Within NinjaScript

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

    Calling an ATM Strategy Within NinjaScript

    When an existing ATM strategy is called within a Ninja Script strategy which is set to Update OnBarClose=True, does the ATM strategy operate in tick x tick mode or in 'bar' mode?

    Specifically, if the ATM strategy called contains a 3-level stop-loss scheme, does it operate in tick x tick basis if called from a strategy operating in OnBarUpdate mode?
    Jim-Boulder
    NinjaTrader Ecosystem Vendor - Elephant Tracks

    #2
    An ATM strategy always operate on real-time market data events...so tick by tick.
    RayNinjaTrader Customer Service

    Comment


      #3
      How to call ATM strategy in a ninja script? Any help for this problem

      Comment


        #4
        Please see this link here for more info - http://www.ninjatrader-support.com/H...trategies.html

        A complete coding example can be found in the per default installed 'SampleAtmStrategy' in NinjaTrader.

        Comment


          #5
          Help please....

          Anyone there that could me in this problem. I already build an ATM strategy template in the Super Dom and then I want to call this into my ninja script strategy. But when I tried to backtest this strategy it will worked properly. Here is my code below:

          if (CrossAbove(SMA(SMA1), SMA(SMA2), 1))
          {
          if (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) )
          {
          if (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


            #6
            Let's continue in your other thread on the same issue, thanks.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            672 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            379 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            111 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            577 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            582 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X