Statistics: Posted by vvFish — Mon May 27, 2024 7:38 pm — Replies 2880 — Views 179060
Statistics: Posted by DaveTrader — Mon May 27, 2024 7:12 pm — Replies 7 — Views 3800
Statistics: Posted by Curioso — Mon May 27, 2024 7:05 pm — Replies 3 — Views 472
Does this affect ATS too? Someone having issues with 1418? As far as I know, MT4 updates itself automatically once in a while
Statistics: Posted by VespaTrader — Mon May 27, 2024 6:49 pm — Replies 4160 — Views 1139719
Statistics: Posted by BeatlemaniaSA — Mon May 27, 2024 5:58 pm — Replies 464 — Views 224119
Statistics: Posted by BeatlemaniaSA — Mon May 27, 2024 5:42 pm — Replies 3313 — Views 382662
Statistics: Posted by Ogee — Mon May 27, 2024 4:04 pm — Replies 713 — Views 63227
Statistics: Posted by Corrado — Mon May 27, 2024 3:42 pm — Replies 2826 — Views 1563574
Statistics: Posted by thomdel — Mon May 27, 2024 3:00 pm — Replies 15335 — Views 3892147
Statistics: Posted by Papybillou — Mon May 27, 2024 12:42 pm — Replies 236 — Views 81672
Statistics: Posted by nathanvbasko — Mon May 27, 2024 11:54 am — Replies 1478 — Views 279076
Statistics: Posted by funchi — Mon May 27, 2024 8:09 am — Replies 1437 — Views 196042
Statistics: Posted by Intrest 1 — Mon May 27, 2024 6:55 am — Replies 3895 — Views 1315178
Statistics: Posted by kvak — Mon May 27, 2024 6:08 am — Replies 3531 — Views 2054568
Code: Select all
//@version=4study("Supertrend", overlay = true, format=format.price, precision=2, resolution="")Periods = input(title="ATR Period", type=input.integer, defval=10)src = input(hl2, title="Source")Multiplier = input(title="ATR Multiplier", type=input.float, step=0.1, defval=3.0)changeATR= input(title="Change ATR Calculation Method ?", type=input.bool, defval=true)showsignals = input(title="Show Buy/Sell Signals ?", type=input.bool, defval=true)highlighting = input(title="Highlighter On/Off ?", type=input.bool, defval=true)atr2 = sma(tr, Periods)atr= changeATR ? atr(Periods) : atr2up=src-(Multiplier*atr)up1 = nz(up[1],up)up := close[1] > up1 ? max(up,up1) : updn=src+(Multiplier*atr)dn1 = nz(dn[1], dn)dn := close[1] < dn1 ? min(dn, dn1) : dntrend = 1trend := nz(trend[1], trend)trend := trend == -1 and close > dn1 ? 1 : trend == 1 and close < up1 ? -1 : trendupPlot = plot(trend == 1 ? up : na, title="Up Trend", style=plot.style_linebr, linewidth=2, color=color.green)buySignal = trend == 1 and trend[1] == -1plotshape(buySignal ? up : na, title="UpTrend Begins", location=location.absolute, style=shape.circle, size=size.tiny, color=color.green, transp=0)plotshape(buySignal and showsignals ? up : na, title="Buy", text="Buy", location=location.absolute, style=shape.labelup, size=size.tiny, color=color.green, textcolor=color.white, transp=0)dnPlot = plot(trend == 1 ? na : dn, title="Down Trend", style=plot.style_linebr, linewidth=2, color=color.red)sellSignal = trend == -1 and trend[1] == 1plotshape(sellSignal ? dn : na, title="DownTrend Begins", location=location.absolute, style=shape.circle, size=size.tiny, color=color.red, transp=0)plotshape(sellSignal and showsignals ? dn : na, title="Sell", text="Sell", location=location.absolute, style=shape.labeldown, size=size.tiny, color=color.red, textcolor=color.white, transp=0)mPlot = plot(ohlc4, title="", style=plot.style_circles, linewidth=0)longFillColor = highlighting ? (trend == 1 ? color.green : color.white) : color.whiteshortFillColor = highlighting ? (trend == -1 ? color.red : color.white) : color.whitefill(mPlot, upPlot, title="UpTrend Highligter", color=longFillColor)fill(mPlot, dnPlot, title="DownTrend Highligter", color=shortFillColor)alertcondition(buySignal, title="SuperTrend Buy", message="SuperTrend Buy!")alertcondition(sellSignal, title="SuperTrend Sell", message="SuperTrend Sell!")changeCond = trend != trend[1]alertcondition(changeCond, title="SuperTrend Direction Change", message="SuperTrend has changed direction!")
Statistics: Posted by mrtools — Mon May 27, 2024 5:27 am — Replies 430 — Views 257621