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 Hwop38, 05-04-2026, 07:02 PM
        0 responses
        161 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        308 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        245 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        349 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        179 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X