Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plot Singal Above/Below candle ATR*2

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

    Plot Singal Above/Below candle ATR*2

    Hey guys, im trying to make this indicator plot signals above / below the High/Low of the candles 2 times the ATR measure.

    already got the ATR working but dont know how to implement it:

    //Variables

    private DataSeries KATR;
    private double resultATR= 0;

    protected override void Initialize()

    KATR = new DataSeries(this); //ATR Dataseries

    protected override void OnBarUpdate()

    if ( CurrentBars[0] < 14 ) return;
    KATR.Set(ATR(Input,14)[0]);

    double resultATR = (KATR[0] * 10000);


    DrawTextFixed( "ATR", "ATR: " + resultATR.ToString("N1") , TextPosition.BottomRight);


    if (Condition)
    {
    DrawText(xxxxxxxxxxxxxxxxxxx, Low[0] - resultATR*2 ??? , xxxxxxxxxxxxxxxxxxxxx);
    }


    Thank you in advance

    #2
    Hello kabott,

    Thank you for your post.

    Are you trying to create a plot or draw the text at a specific place on the chart? What are you trying to implement?

    Comment


      #3
      HI Patrick, im trying to draw the text at a specific distance from the candle, ATR * 2 from the high of the candle for Sell signals, ATR *2 below the candle Low for Buy Signals

      Comment


        #4
        Hello kabott,

        Thank you for your response.

        For the sell signal you could use the following as an example:
        Code:
        DrawText("ATRSell", ATR(14)[0].ToString(), 0, High[0] + (2*ATR(14)[0]), Color.Black);

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        576 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        334 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        553 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        551 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X