Auftrag beendet
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Spezifikation
//@version=5 indicator(title="TFX_Volatilidad", shorttitle="TFX_Vol", overlay=false) tf = input.timeframe(title="Temporalidad", defval = "D", options=["D","W","M"]) dopen = request.security(syminfo.tickerid, tf, open[1], lookahead=barmerge.lookahead_on) dhigh = request.security(syminfo.tickerid, tf, high[1], lookahead=barmerge.lookahead_on) dlow = request.security(syminfo.tickerid, tf, low[1], lookahead=barmerge.lookahead_on) dclose = request.security(syminfo.tickerid, tf, close[1], lookahead=barmerge.lookahead_on) dopen1 = request.security(syminfo.tickerid, tf, open[2], lookahead=barmerge.lookahead_on) dhigh1 = request.security(syminfo.tickerid, tf, high[2], lookahead=barmerge.lookahead_on) dlow1 = request.security(syminfo.tickerid, tf, low[2], lookahead=barmerge.lookahead_on) dclose1 = request.security(syminfo.tickerid, tf, close[2], lookahead=barmerge.lookahead_on) dopen2 = request.security(syminfo.tickerid, tf, open[3], lookahead=barmerge.lookahead_on) dhigh2 = request.security(syminfo.tickerid, tf, high[3], lookahead=barmerge.lookahead_on) dlow2 = request.security(syminfo.tickerid, tf, low[3], lookahead=barmerge.lookahead_on) dclose2 = request.security(syminfo.tickerid, tf, close[3], lookahead=barmerge.lookahead_on) dopen3 = request.security(syminfo.tickerid, tf, open[4], lookahead=barmerge.lookahead_on) dhigh3 = request.security(syminfo.tickerid, tf, high[4], lookahead=barmerge.lookahead_on) dlow3 = request.security(syminfo.tickerid, tf, low[4], lookahead=barmerge.lookahead_on) dclose3 = request.security(syminfo.tickerid, tf, close[4], lookahead=barmerge.lookahead_on) dopen4 = request.security(syminfo.tickerid, tf, open[5], lookahead=barmerge.lookahead_on) dhigh4 = request.security(syminfo.tickerid, tf, high[5], lookahead=barmerge.lookahead_on) dlow4 = request.security(syminfo.tickerid, tf, low[5], lookahead=barmerge.lookahead_on) dclose4 = request.security(syminfo.tickerid, tf, close[5], lookahead=barmerge.lookahead_on) //CALC atr = 100*((((dhigh-dlow)/dlow) + ((dhigh1-dlow1)/dlow1) + ((dhigh2-dlow2)/dlow2) + ((dhigh3-dlow3)/dlow3)+ ((dhigh4-dlow4)/dlow4))/5) //PLOT plot(atr, title = "Parcialidad", color=color.rgb(41, 114, 173, 50), linewidth=5, offset=1) h1 = hline(0.5, linestyle=hline.style_dotted, linewidth=1, color=color.white, title="Nivel 1") h2 = hline(1.0, linestyle=hline.style_dotted, linewidth=1, color=color.white, title="Nivel 2")