Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

STOP Indicator HELP

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

    STOP Indicator HELP

    I have read through and tried Chandelier Stop; Chandelier Basic, TS Super Trend. Perhaps I am inputing wrong but it does not help me. Let me try to explain (Thanks everyone...relative inexperienced with programming code)

    What I am trying to accomplish is to create an indicator (OR A SET OF OFFSET RULES) to initiate an EXIT strategy:

    Take the High of Last Bar and subtract a multiple of ATR.1 from that high price.

    Take the LOW of last bar and ADD a multiple of ATR.1 to that LOW price.

    So my exit strategy would be:

    On SHORT Trade: Sell at Limt Order IF HIGH(0) >= HIGH(1) - (Mult.*ATR(1)), where limit order price would = HIGH(1) - (Mult.*ATR(1))
    On LONG Trade: Sell at Limit Order IF LOW(0) <= LOW(1) + (Mult. * ATR(1)), where limit order price would = LOW(1) + (Mult. * ATR(1))

    In strategy wizard, I thought I could do this by stating IF:
    HIGH(0) > HIGH(1) with Offset of HIGH = ATR(1) with ATR Period = User Defined and Offset of ATR = Percent and percent = User Defined Input of say -400 to +400 (is that right?? 100 because of percent?)

    then,
    sell at limit order

    Thanks to anyone that can steer me with this kind of simple programming expertise.

    #2
    Hello,

    Can you post screen shots of your strategy wizard conditions?
    DenNinjaTrader Customer Service

    Comment


      #3
      Position.MarketPosition == MarketPosition.Short
      High[0] >= High[1] + (ATR(MALengthShrt)[1]) * (1 + ATRMultShrt) * TickSize


      ExitShortLimit(High[1] + (ATR(MALengthShrt)[1]) * (1 + ATRMultShrt) * TickSize, "Close SHORT","

      Comment


        #4
        One more thing...I am trying to NOT let the calculated value INCREASE any stop. If a calculated value is FURTHER than previous value, then KEEP previous value.

        So, on a SHORT trade, if NEW calculated (Hi Minus ATR*Mult) <= PREVIOUS (Hi Minus ATR*Mult), then use NEW, Else KEEP Previous.

        On a LONG trade, if NEW calculated (LOW Plus ATR*Mult) >= PREVIOUS (Low Plus ATR*Mult), then use NEW, ELSE Keep Previous.

        I was hoping this could be accomplished in strategy wizard.

        Comment


          #5
          Hello,

          Try adding *(-1) next to (1 + ATRMultShrt) * TickSize and that will give you a negative number which will be subtracted. Or change the ATRMultShrt output so that it is negative and use that in you Wizard. Or, and most simple, change the "+" to a "-" after you are finished with the strategy. (Note once you change the code by hand you can no longer use the wizard, so I recommend that you save hand made changes until the end.)

          What you are trying to do, is not possible in the Wizard by default.

          Regarding the other post, you can do this by using the Set user defined variable option in the actions section.

          Your strategy is getting complex enough that you may be reaching the out ends of the Wizard functionality. If you can't program, I suggest requesting assistance from a ninjascript consultant:
          DenNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          581 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          338 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          554 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          552 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X