Within my research, I found an approach that can be useful for anyone who operates indexes. My idea was to use the ATR support/resistance basis as a "filter" to consider valid entries.
I didn't find something similar in MT4, but I found this code in Tradingview and this image in Thinkscript. And if you allow me the insight, I don't know if there is the possibility of creating this indicator in MTF for example. A practical example would be to assess when a stock/index is outside its average price. or even "cheap".
Code: Select all
//@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)