Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NTscript - ATM

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

    NTscript - ATM

    Hello,

    I join a NT-script-strat with an ATM-strat (for having only "basic" stops from the ATM and I can move them within the trade - of course in a chart with chart-trader and not the strat).

    In the strategy I work with variables for the stops eg
    SetStopLoss("L1", CalculationMode.Price, stop2,false);

    As the stops are coming from the ATM how can I join them with the conditions in the script? I can not determine "L1" in the ATM, I think.

    Thanks a lot!
    Tony

    #2
    TonyNT,

    I am happy to assist you.

    You can use ATM strategies with your automated strategies by using the following reference sample.



    There is also a reference sample that comes with NinjaTrader by default. It is named SampleAtmStrategy and is accessible through Tools > Edit NinjaScript > Strategy.

    Please let me know if I may assist further.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Adam,

      thank you for your reply. I know the samples - this is how I could do it to join script-stratgies and charttrader-ATM.

      The question in concern and the only question is how one can handle the stoplosses from the ATM in the script-strategy? How can the stops from the ATM be matched with the conditions/variables in the script-strategy? In the ATM I can not give names to eg the 3 contracts with different stoplosses.

      From the ATM the stops start with a certain distance to entry-price. Then the stops should be working as coded in the script-strategy (not as in the ATM). (There are serious reason for this eg to avoid brackets...)

      This is not to see in the both samples.

      Or can the stops from the ATM be matched with stops coded in the script when the strategy is running somehow? Can maybe 3 stops from the ATM be renamed to S1, S2, S3 in the script so that they are working then referring to the strategy? (you know in the ATM one can not (???) code the stops as variables eg working with ATR or other conditions.

      Thanks
      Tony

      Originally posted by NinjaTrader_AdamP View Post
      TonyNT,

      I am happy to assist you.

      You can use ATM strategies with your automated strategies by using the following reference sample.



      There is also a reference sample that comes with NinjaTrader by default. It is named SampleAtmStrategy and is accessible through Tools > Edit NinjaScript > Strategy.

      Please let me know if I may assist further.
      Last edited by tonynt; 11-12-2011, 01:45 PM. Reason: idea

      Comment


        #4
        tonyNT,

        Here is a helpful link.

        Adam P.NinjaTrader Customer Service

        Comment


          #5
          Thank you for your reply.

          Referring to your link I have added to the script now

          if (Close[0] < Position.AvgPrice - 50 * TickSize)
          {AtmStrategyChangeStopTarget(0, Position.AvgPrice, "STOP1", "AtmIdValue");
          AtmStrategyChangeStopTarget(0, Position.AvgPrice+10*TickSize, "STOP2", "AtmIdValue");
          AtmStrategyChangeStopTarget(0, Position.AvgPrice+30*TickSize, "STOP3", "AtmIdValue");
          }

          But the stops do not change, the remain in the initial position this is the value determined in Chart-Trader and they do not change. What might be the reason?

          Thanks
          Tony


          Originally posted by NinjaTrader_AdamP View Post
          Last edited by tonynt; 11-13-2011, 01:41 PM. Reason: wrong questioned

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by jaybedreamin, Today, 05:56 PM
          0 responses
          3 views
          0 likes
          Last Post jaybedreamin  
          Started by DJ888, 04-16-2024, 06:09 PM
          6 responses
          18 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by Jon17, Today, 04:33 PM
          0 responses
          1 view
          0 likes
          Last Post Jon17
          by Jon17
           
          Started by Javierw.ok, Today, 04:12 PM
          0 responses
          6 views
          0 likes
          Last Post Javierw.ok  
          Started by timmbbo, Today, 08:59 AM
          2 responses
          10 views
          0 likes
          Last Post bltdavid  
          Working...
          X