Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

stop move

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

    stop move

    Hello,

    in the attached jpg you can see my blue dashed-line stop. It is an indicator and I put my stop 20 ticks above it (for shorts). Generally everything works fine but the stops move somehow strange.

    In the screenshot you can see that the stop is at 1,5957´3 (that is 20 ticks above the blue dashed line) but it should be already at 1,5952´5 (that is 20 ticks above next blue dashed line).

    Even with CalculateOnBarClose=true it should be there as the bar with the last dashed line is already closed and the next bar already built some time.

    There are no conditions for this stop - only the indicator (and the dashed line is already there). So, why doesn´t the stop move?

    The stop is "SetStopLoss("S4",CalculationMode.Price, stop4,false);" and as mentioned it works usually fine, but when does indicator values move the stop (for your information, that blue dashed line is nothing more than a Donchian).

    Thanks
    Tony
    Attached Files

    #2
    Hello tonynt,

    How are you setting the stop loss? Is this in Initialize or OnBarUpdate?

    What is the stop4 variable you are using?
    MatthewNinjaTrader Product Management

    Comment


      #3
      I do the variable here in the OnBarUpdate

      protected override void OnBarUpdate()
      {if (BarsInProgress !=0)
      return;

      stop4=DonchianChannel(BarsArray[5],8).Upper[0]+20*TickSize;

      The stop moves - but not with every bar in the chart with dataseries BarsArray[5]


      Originally posted by NinjaTrader_Matthew View Post
      Hello tonynt,

      How are you setting the stop loss? Is this in Initialize or OnBarUpdate?

      What is the stop4 variable you are using?

      Comment


        #4
        TonyNT,

        What is the BarsArray[5]? Is this an indicator or another data series?

        Are you expecting the stop to move when the primary bars in progress are called? Or when the BarsArray[5] is called?
        MatthewNinjaTrader Product Management

        Comment


          #5
          This is another data series.

          I expect the stop to move when this barsarray[5] dataseries is called (when the 50RangeBar crosses the Donchian in barsarray[5])



          Originally posted by NinjaTrader_Matthew View Post
          TonyNT,

          What is the BarsArray[5]? Is this an indicator or another data series?

          Are you expecting the stop to move when the primary bars in progress are called? Or when the BarsArray[5] is called?

          Comment


            #6
            eliminated other dataseries

            I have now eliminated other dataseries.

            The strategy is running a renko25 and in the short-strategy the stop is defined in this dataseries as upperDonchian +20*TickSize. Calc. Bar Close=true

            In the new attached jpg you can see in the red circle the referring donchian as blue dash and you can see the stop still is above the donchian the bars before.

            Why and when does the stop move to the "actual" double stop?

            Thanks
            Tony

            Originally posted by NinjaTrader_Matthew View Post
            TonyNT,

            What is the BarsArray[5]? Is this an indicator or another data series?

            Are you expecting the stop to move when the primary bars in progress are called? Or when the BarsArray[5] is called?
            Attached Files
            Last edited by tonynt; 09-07-2011, 08:53 AM. Reason: typing error

            Comment


              #7
              tonynt,

              The stop should update when OnBarUpdate is called.

              Can you please provide me with the code you are using so I can double check how this is being Set and called?
              MatthewNinjaTrader Product Management

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by algospoke, Yesterday, 06:40 PM
              2 responses
              19 views
              0 likes
              Last Post algospoke  
              Started by ghoul, Today, 06:02 PM
              3 responses
              14 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by jeronymite, 04-12-2024, 04:26 PM
              3 responses
              44 views
              0 likes
              Last Post jeronymite  
              Started by Barry Milan, Yesterday, 10:35 PM
              7 responses
              20 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by AttiM, 02-14-2024, 05:20 PM
              10 responses
              180 views
              0 likes
              Last Post jeronymite  
              Working...
              X