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 cmoran13, 04-16-2026, 01:02 PM
        0 responses
        46 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        28 views
        0 likes
        Last Post PaulMohn  
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        163 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        98 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        158 views
        2 likes
        Last Post CaptainJack  
        Working...
        X