Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

TSSuperTrend

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

    TSSuperTrend

    I would like to have three [3] ATR stops on chart with same period but different multipliers
    and color the area between middle and one ATR one color and color area between middle ATR and the other ATR another color.

    How do I do that?

    #2
    Hi rtj4201,

    This can be accomplished with a NinjaScript Strategy.

    First, you will need to set your strategy to allow 3 long or short orders.
    http://www.ninjatrader.com/support/h...rdirection.htm

    Then you will need to submit 3 entry orders. For each of these entry orders use a signal name. In the stop losses for these 3 entry orders use a fromSignalName.
    http://www.ninjatrader.com/support/h.../enterlong.htm
    http://www.ninjatrader.com/support/h...etstoploss.htm

    SetStopLoss("entry1", CalculationMode.Ticks, Instrument.MasterInstrument.Round2TickSize(ATR(5)[0], false);

    Then use DrawRegion to shade the chart between the two prices of the ATR dataseries.

    DrawRegion(string tag, CurrentBar, 0, ATR(5), ATR(10), Color.Black, Color.Grey, 9);

    DrawRegion(string tag, int startBarsAgo, int endBarsAgo, IDataSeries series1, IDataSeries series2, Color outlineColor, Color areaColor, int areaOpacity)
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      I may have confused this by saying ATR stop. I meant an ATR line. I intended this to be an indicator not a strategy.

      Can an indicator be done to color areas between middle ATR and outer ATRs with a different color?

      Comment


        #4
        Hi rtj4201,

        Yes, the method is the same, however, you would not submit any orders.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          I have coded something like that, but only uses two distinct SuperTrend indicators. The base indicator is a SuperTrendM11, which uses the (statistical) median one bar ago and the ATR one bar ago. There is no point in including the current value in the calculation as it only increases CPU load and skews the ATR to the downside when used in COBC = false.

          When the two SuperTrends align the region between the stoplines is shows the uptrending or downtrending color, otherwise it is gray.
          Attached Files

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          597 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          343 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
          556 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          555 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X