Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

stopmanagement

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

    stopmanagement

    Hello,

    in the ATM the trailstop can be defined with steps, stoploss, frequency and profit trigger.

    In NT-script how is the trailstop handled? We have only double value, does this mean that the trailstop moves with every tick?

    Thanks
    Tony

    #2
    Hello tonynt,

    Thank you for your post.

    When using SetTrailStop() the value will be an offset from the entry price and will trail the last trade price with each tick in profit.
    MatthewNinjaTrader Product Management

    Comment


      #3
      Hello,

      isn´t this maybe CPU intensive? Isn´t there a possibilty to work with frequencies?

      Comment


        #4
        Hello Tony,

        You can set the CalculateOnBarClose property to True and the SetTrailStop() will not adjust until the next bar closes.

        If this is set to false, it will update with each incoming tick.

        If you would like to control the frequency, you would need to call an ATM Strategy:



        Please let me know if you have additional questions.
        MatthewNinjaTrader Product Management

        Comment


          #5
          Hello Matthew,

          thanks. Matthew, how can I bring up the stoplosses visible in my strategy-chart-window? Thx

          Comment


            #6
            tonynt,

            If the strategy is enabled on the chart, you will not be able to enable chart trader to view these orders.

            You would need to create a new chart with Chart Trader enabled to view these.

            Or you can enable the Strategy from Strategies tab of the Control Center which will allow you to enable chart trader on the chart you are using as reference.

            Please see our Help Guide article on the Strategies Tab of more information:

            MatthewNinjaTrader Product Management

            Comment


              #7
              Matthew, thank you. Clear now. Beside the trailstop I have done stop-management with variables Stoploss moves referring variable 1, then it moves referring variable2 but after some time back to variable 1, then again to stoploss referring variable 2 or 3 and again back to variable1...... All the time. What did I wrong? I referred to the samplepricemodification, but in the sample is only one step with if and elseif, so I did it with variables. I just want to have stops to BE and then changing with variable in stoploss (Donchian). Thx.


              stop1=DonchianChannel(5).Upper[0]+2*TickSize;
              stop2=DonchianChannel(8).Upper[0]+2*TickSize;
              stop3=DonchianChannel(13).Upper[0]+2*TickSize;

              if(Position.MarketPosition == MarketPosition.Flat)
              { SetStopLoss("S1", CalculationMode.Ticks, 70, false);
              SetStopLoss("S2", CalculationMode.Ticks, 70, false);
              Variable1 = 0;
              Variable2 = 0;
              Variable3 = 0;

              if (Position. MarketPosition==MarketPosition.Short
              && Close[0]<Position.AvgPrice - 60*TickSize)
              {Variable1 = 1;}

              if (Variable1 == 1)
              {SetStopLoss("S1", CalculationMode.Price, Position.AvgPrice+2*TickSize,false);
              SetStopLoss("S2", CalculationMode.Price, Position.AvgPrice+2*TickSize,false);}

              if (Position.MarketPosition == MarketPosition.Short
              && Close[0] < Position.AvgPrice - 90 * TickSize)
              {Variable2 = 1;}

              if (Variable2 == 1)
              {SetStopLoss("S1", CalculationMode.Price, stop1, false);
              SetStopLoss("S2", CalculationMode.Price, stop2, false); }

              if (Position.MarketPosition == MarketPosition.Short
              && Close[0] < Position.AvgPrice - 200 * TickSize)
              {Variable3 = 1;}

              if (Variable3 == 1)
              {SetStopLoss("S1", CalculationMode.Price, stop2, false);
              SetStopLoss("S2", CalculationMode.Price, stop3, false);}
              Last edited by tonynt; 07-13-2011, 11:49 AM.

              Comment


                #8
                Tony,

                You would need to use If/Else if where you are setting the variable from the condition.

                Please see the MSDN article on the if/else if ladder for more information:

                MatthewNinjaTrader Product Management

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by junkone, 04-21-2024, 07:17 AM
                10 responses
                148 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Started by tsantospinto, 04-12-2024, 07:04 PM
                6 responses
                101 views
                0 likes
                Last Post tsantospinto  
                Started by rocketman7, Today, 02:12 AM
                5 responses
                26 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by ZenCortexReal, Today, 08:54 AM
                0 responses
                1 view
                0 likes
                Last Post ZenCortexReal  
                Started by ZenCortexReal, Today, 08:52 AM
                0 responses
                0 views
                0 likes
                Last Post ZenCortexReal  
                Working...
                X