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 WHICKED, 06-27-2023, 12:07 PM
                63 responses
                762 views
                1 like
                Last Post Leeroy_Jenkins  
                Started by rtwave, Today, 12:10 AM
                0 responses
                4 views
                0 likes
                Last Post rtwave
                by rtwave
                 
                Started by franatas, 06-03-2024, 11:41 PM
                7 responses
                26 views
                0 likes
                Last Post franatas  
                Started by cdsmart, 02-09-2021, 07:07 PM
                3 responses
                170 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by xxlunarxx, Yesterday, 09:35 PM
                0 responses
                5 views
                0 likes
                Last Post xxlunarxx  
                Working...
                X