Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

script-atm-exit handling

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

    script-atm-exit handling

    Hello,

    when there is a trade with eg 3 lots entered by calling a chart-trader-ATM from a NT-script-strategy can the exits of these positions be handled within the strategy like the entries would have been realized with NT-script? In the helpguide there is only the exit with unrealizedprofitloss but not with ticks or variables. Can the exit only be done with Target from ATM-chart-trader or also be handled like in a script eg
    if (GetCurrentAsk(0) < Position.AvgPrice - 80 * TickSize)
    ExitShort(1000, "SX2","S2");"

    Thanks
    Tony

    #2
    tonynt,

    Could you please clarify what you mean? Are you wanting to monitor stop losses, etc. outside of the ATM strategy code?

    You can use the following methods for handling orders within an ATM strategy.



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

    Comment


      #3
      Adam,

      in a NT-script-strat I do an entry with 3 lots from Chart-Trader-ATM. This is because I want to move the stops in my script-strat during the trade (beside my conditions there- if necessary). And I do not work with profit-targets as OCO.

      In my script-strats I do my exits as I have mentioned above eg for my 2nd short lot with "if (GetCurrentAsk(0) < Position.AvgPrice - 130 * TickSize)
      ExitShort(1000, "SX2","S2");"

      How can one do in the script-strat the exit of the 3 positions coming from ATM-chart-trader please? (There are no profit-targets for the positions as I never want to have a bracket on brokers-server after internet outage August, 2010 and I do the "targets" as mentioned above. So how can I do this when the entries are not coming from the script but from ATM-chart-trader)

      I hope I could explain now better.

      Thanks
      Tony


      Originally posted by NinjaTrader_AdamP View Post
      tonynt,

      Could you please clarify what you mean? Are you wanting to monitor stop losses, etc. outside of the ATM strategy code?

      You can use the following methods for handling orders within an ATM strategy.



      Please let me know if I may assist further.
      Last edited by tonynt; 11-16-2011, 04:25 PM. Reason: typing error

      Comment


        #4
        tonynt,

        You can use the AtmStrategyClose() method along with the AtmStrategyRealizedProfitLoss() method to exit your trades at predefined levels.

        PNL : http://www.ninjatrader.com/support/h...edprofitlo.htm

        Close Strategy : http://www.ninjatrader.com/support/h...ategyclose.htm

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

        Comment


          #5
          Adam,

          this works with PL but not with variables, no? But if I do it this way and calculating the PL how can I refer to each of the 3 positons?


          Thanks
          Tony



          Originally posted by NinjaTrader_AdamP View Post
          tonynt,

          You can use the AtmStrategyClose() method along with the AtmStrategyRealizedProfitLoss() method to exit your trades at predefined levels.

          PNL : http://www.ninjatrader.com/support/h...edprofitlo.htm

          Close Strategy : http://www.ninjatrader.com/support/h...ategyclose.htm

          Please let me know if I may assist further.

          Comment


            #6
            TonyNT,

            For that you would need to use AtmStrategyChangeStopTarget()

            For more information, please see the following : http://www.ninjatrader.com/support/h...stoptarget.htm
            Adam P.NinjaTrader Customer Service

            Comment


              #7
              Adam,

              of course I can use STOP. But there is no TARGET (because no target is defined in the ATM-Charttrader - to avoid brackets on brokers server). Or do you mean "TARGET2" is linked per default with "STOP2" maybe?

              In the meantime I did testing and I had same range-size a script with "direct entry" and a script with "entry from chart-trader-ATM. It occurs that entry by the strategy working with charttrader is sometime only next bar. Can this occur - time delay?

              Thanks
              Tony


              Originally posted by NinjaTrader_AdamP View Post
              TonyNT,

              For that you would need to use AtmStrategyChangeStopTarget()

              For more information, please see the following : http://www.ninjatrader.com/support/h...stoptarget.htm

              Comment


                #8
                Tony, if you have no profit target defined that's fine, STOP2 refers to the stop value of the second target stop price.

                The entry is done whenever the conditions you programmed evaluate to 'true' - with CalculateOnBarClose = true the earliest entry is the next bar. If you run the script on 'false' it can enter intrabar as well.
                BertrandNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Mindset, 05-06-2023, 09:03 PM
                9 responses
                258 views
                0 likes
                Last Post ender_wiggum  
                Started by Mizzouman1, Today, 07:35 AM
                4 responses
                18 views
                0 likes
                Last Post Mizzouman1  
                Started by philmg, Today, 01:17 PM
                1 response
                6 views
                0 likes
                Last Post NinjaTrader_ChristopherJ  
                Started by cre8able, Today, 01:01 PM
                1 response
                8 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by manitshah915, Today, 12:59 PM
                1 response
                5 views
                0 likes
                Last Post NinjaTrader_Erick  
                Working...
                X