Re: Already Converted TradingView Indicators to MT4 Indicators

491
RodrigoRT7 wrote: Sat Nov 23, 2024 10:02 am Good evening, Mr. Tools, how are you? This indicator is one of my favorite trend following indicators, is there a possibility of including the candles for it in the chart? and update the avgs and rmas?

tks in advance!!
Follow The Line with Regularized MA's + All Averages (Filters) + Trend Mode & Candlestick Overlay

Hello, added a candle option, trend mode option, and update the averages plus Regularized Moving Averages too.

PS: For more information on this code, please see: Follow The Line + Angle Of Attack indicators.


Re: Already Converted TradingView Indicators to MT4 Indicators

492
mrtools wrote: Sun Nov 24, 2024 3:51 pm Hello, added a candle option, trend mode option, and update the averages.



Respected mrtools Sir,

Super Thanks for colour bar option to this indicator.


Thanks. Thanks. Thanks.
These users thanked the author thomdel for the post (total 10):
boytoy, Jimmy, moey_dw, Akela, mrtools, talaate, RodrigoRT7, MACDBOSS, macd & rsi, ChuChu Rocket

Re: Already Converted TradingView Indicators to MT4 Indicators

493
mrtools wrote: Sun Nov 24, 2024 3:51 pm Follow The Line with Regularized MA's + All Averages (Filters) + Trend Mode & Candlestick Overlay
thomdel wrote: Sun Nov 24, 2024 6:23 pm Respected mrtools Sir,
Super Thanks for colour bar option to this indicator.
Thanks. Thanks. Thanks.
Bros what a great great great weekend update... love the trend mode again and Rodrigo's template colors are perfect dark mode for me. This is a powerful trend indicator indeed
These users thanked the author boytoy for the post (total 5):
mrtools, RodrigoRT7, MACDBOSS, Jimmy, ChuChu Rocket

Re: Already Converted TradingView Indicators to MT4 Indicators

494
mrtools wrote: Sun Nov 24, 2024 3:51 pm Follow The Line with Regularized MA's + All Averages (Filters) + Trend Mode & Candlestick Overlay

Hello, added a candle option, trend mode option, and update the averages plus Regularized Moving Averages too.

PS: For more information on this code, please see: Follow The Line + Angle Of Attack indicators.
I'm going to comment on how much I liked this indicator, because it was already good and has gotten even better. but the feedback and likes have already spoken for me, thank you very much for this indicator Mr Tools :D
These users thanked the author RodrigoRT7 for the post (total 2):
mrtools, MACDBOSS


Re: Already Converted TradingView Indicators to MT4 Indicators

496
mrtools wrote: Sun Nov 24, 2024 3:51 pm Follow The Line with Regularized MA's + All Averages (Filters) + Trend Mode & Candlestick Overlay

Hello, added a candle option, trend mode option, and update the averages plus Regularized Moving Averages too.

PS: For more information on this code, please see: Follow The Line + Angle Of Attack indicators.
good night Mr Tools!!

I found an indicator with a concept that I really like in Scale Trading, which is the ATR Grid.

however, this indicator only shows the ATR corresponding to the period analyzed. example. Daily chart only shows one day.

It would be interesting to have a history so we can do a backtest. :D

as well as tradingview's ATR 0.5 & 0.7 Range indicator.

Is there a possibility of converting this tradingview code with the same functions as the ATR GRID indicator?

Thank you very much in advance :D. I wish you a great week.

//@version=3
study("ATR Grid from daily", overlay=true, shorttitle="ATRGrid")
lvl1 = 0.5, lvl2 = 0.7, daily_atr_len = 15

atr_func = atr(daily_atr_len)
day_atr = security(tickerid, 'D', atr_func)
day_close = security(tickerid, 'D', close)

p1 = plot(day_close + day_atr, color=red)
p07 = plot(day_close + day_atr * lvl2, color=orange)
fill(p1, p07, color = orange)
p05 = plot(day_close + day_atr * lvl1, color=yellow)
fill(p07, p05, color = yellow)
m05 = plot(day_close - day_atr * lvl1, color=yellow)
// fill(m05, p05, color = green)
m07 = plot(day_close - day_atr * lvl2, color=orange)
fill(m07, m05, color = yellow)
m1 = plot(day_close - day_atr, color=red)
fill(m1, m07, color = orange)
These users thanked the author RodrigoRT7 for the post:
ChuChu Rocket

Re: Already Converted TradingView Indicators to MT4 Indicators

498
RodrigoRT7 wrote: Mon Nov 25, 2024 1:55 pm good night Mr Tools!!

I found an indicator with a concept that I really like in Scale Trading, which is the ATR Grid.

however, this indicator only shows the ATR corresponding to the period analyzed. example. Daily chart only shows one day.

It would be interesting to have a history so we can do a backtest. :D

as well as tradingview's ATR 0.5 & 0.7 Range indicator.

Is there a possibility of converting this tradingview code with the same functions as the ATR GRID indicator?

Thank you very much in advance :D. I wish you a great week.

//@version=3
study("ATR Grid from daily", overlay=true, shorttitle="ATRGrid")
lvl1 = 0.5, lvl2 = 0.7, daily_atr_len = 15

atr_func = atr(daily_atr_len)
day_atr = security(tickerid, 'D', atr_func)
day_close = security(tickerid, 'D', close)

p1 = plot(day_close + day_atr, color=red)
p07 = plot(day_close + day_atr * lvl2, color=orange)
fill(p1, p07, color = orange)
p05 = plot(day_close + day_atr * lvl1, color=yellow)
fill(p07, p05, color = yellow)
m05 = plot(day_close - day_atr * lvl1, color=yellow)
// fill(m05, p05, color = green)
m07 = plot(day_close - day_atr * lvl2, color=orange)
fill(m07, m05, color = yellow)
m1 = plot(day_close - day_atr, color=red)
fill(m1, m07, color = orange)
Hello, wouldn't that be the same or similar to Mladen's atr probability?

Re: Already Converted TradingView Indicators to MT4 Indicators

499
Here is a start...
Xard777

Code: Select all

//+------------------------------------------------------------------+
//| ATR Grid Indicator from Daily                                  |
//+------------------------------------------------------------------+
#property indicator_chart_window
#property indicator_buffers 6
#property indicator_color1 Red
#property indicator_color2 Orange
#property indicator_color3 Yellow
#property indicator_color4 Yellow
#property indicator_color5 Orange
#property indicator_color6 Red
#property indicator_width1 1
#property indicator_width2 1
#property indicator_width3 1
#property indicator_width4 1
#property indicator_width5 1
#property indicator_width6 1

//--- Input parameters
input int daily_atr_len = 15;
double lvl1 = 0.5;
double lvl2 = 0.7;

//--- Buffers for storing ATR values
double Buffer1[];
double Buffer2[];
double Buffer3[];
double Buffer4[];
double Buffer5[];
double Buffer6[];

int OnInit()
{
   SetIndexBuffer(0, Buffer1, INDICATOR_DATA);
   SetIndexBuffer(1, Buffer2, INDICATOR_DATA);
   SetIndexBuffer(2, Buffer3, INDICATOR_DATA);
   SetIndexBuffer(3, Buffer4, INDICATOR_DATA);
   SetIndexBuffer(4, Buffer5, INDICATOR_DATA);
   SetIndexBuffer(5, Buffer6, INDICATOR_DATA);

   SetIndexStyle(0, DRAW_LINE);
   SetIndexStyle(1, DRAW_LINE);
   SetIndexStyle(2, DRAW_LINE);
   SetIndexStyle(3, DRAW_LINE);
   SetIndexStyle(4, DRAW_LINE);
   SetIndexStyle(5, DRAW_LINE);

   IndicatorShortName("ATR Grid from Daily");
   return(INIT_SUCCEEDED);
}

int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
{
   int limit;
   if(prev_calculated == 0)
      limit = rates_total - daily_atr_len;
   else
      limit = rates_total - prev_calculated;

   // Daily ATR calculation
   for(int i = limit; i >= 0; i--)
   {
      double dailyATR = iATR(NULL, PERIOD_D1, daily_atr_len, i);
      double dailyClose = iClose(NULL, PERIOD_D1, i);

      Buffer1[i] = dailyClose + dailyATR;
      Buffer2[i] = dailyClose + dailyATR * lvl2;
      Buffer3[i] = dailyClose + dailyATR * lvl1;
      Buffer4[i] = dailyClose - dailyATR * lvl1;
      Buffer5[i] = dailyClose - dailyATR * lvl2;
      Buffer6[i] = dailyClose - dailyATR;
   }
   
   return(rates_total);
}
// Note: Fill color between lines in MT4 is not directly supported like in TradingView.
// You might need to use a custom indicator or modify the chart appearance externally to achieve the fill effect.
These users thanked the author xard777 for the post (total 2):
RodrigoRT7, mrtools
XARD: If Carlsberg made charts... Probably the best charts in the world

Re: Already Converted TradingView Indicators to MT4 Indicators

500
mrtools wrote: Wed Nov 27, 2024 7:52 am Hello, wouldn't that be the same or similar to Mladen's atr probability?
Hi Mr Tools!! ATR ADR only looks at the present. I can only see the present timeframe.

but the idea would be to look at past ATRs to see if the price was between 0.50 -0.70 of the ATR as in the example in this photo.

My idea would be to test other volatility pivots in the past to see what the average behavior of some stocks would be.

Note: I marked some examples in the photo, but not all. :D

big tks in advance