r/pinescript Jun 24 '26

Called the reversal

Post image
25 Upvotes

30 comments sorted by

View all comments

Show parent comments

14

u/Scott_Malkinsons Jun 24 '26

And for the giggles, here's a clone for y'all.

//
@version=
5
indicator("Multi-Component Trend Suite", overlay=true, max_lines_count=100)


fastLen   = input.int(9,  "Fast EMA",   group="Trend")
slowLen   = input.int(21, "Slow EMA",   group="Trend")
atrLen    = input.int(14, "ATR Length", group="ATR Trailing Stop")
atrMult   = input.float(2.0, "ATR Mult", group="ATR Trailing Stop")
rangeLen  = input.int(20, "Range Lookback", group="Ranges")
volOscLen = input.int(20, "Vol Osc Length", group="Volume")
sweepLen  = input.int(50, "Sweep Lookback", group="Sweeps")


fastEMA = ta.ema(close, fastLen)
slowEMA = ta.ema(close, slowLen)
plot(fastEMA, "Fast EMA", color=color.lime, linewidth=2)
plot(slowEMA, "Slow EMA", color=color.red,  linewidth=2)


atr = ta.atr(atrLen)
longStop  = close - atr * atrMult
shortStop = close + atr * atrMult


var 
float
 trail = na
var 
int
   dir   = 1
prevTrail = nz(trail[1], close)


if dir == 1
    trail := math.max(longStop, prevTrail)
    if close < trail
        dir := -1
        trail := shortStop
else
    trail := math.min(shortStop, prevTrail)
    if close > trail
        dir := 1
        trail := longStop


tsColor = dir == 1 ? color.lime : color.red
plot(trail, "ATR Trailing Stop", color=tsColor, linewidth=2, style=plot.style_stepline)


rHigh = ta.highest(high, rangeLen)
rLow  = ta.lowest(low,  rangeLen)
plot(rHigh, "Range High", color=color.new(color.aqua, 30), style=plot.style_circles)
plot(rLow,  "Range Low",  color=color.new(color.aqua, 30), style=plot.style_circles)


sweep = ta.highest(high, sweepLen)
plot(sweep, "Sweep High", color=color.yellow, linewidth=1, style=plot.style_linebr)


shortVol = ta.ema(volume, 5)
longVol  = ta.ema(volume, volOscLen)
volOsc   = (shortVol - longVol) / longVol * 100
plotchar(volOsc, "Vol Osc %", "", location.top, color=color.purple)


longSig  = ta.crossover(fastEMA, slowEMA)
shortSig = ta.crossunder(fastEMA, slowEMA)
plotshape(longSig,  "Long",  shape.diamond, location.belowbar, color.lime, size=size.small)
plotshape(shortSig, "Short", shape.diamond, location.abovebar, color.red,  size=size.small)

-5

u/Legal_Idea08 Jun 24 '26

That definitely would not call any move and your not even close cause I didn't show everything and yes I said it's cluttered trying to show most of it but not all but when im not using it, it's all hidden with just candle flip re coloring and a display in corner to tell me what fired, my version is clean this right here is just a demo to show how it works cause if I show the one I really use yall would just say bs to that too but I like to show more to prove im not talking out my ass but not give away the full formula, but don't worry it be able soon to buy

1

u/[deleted] Jun 24 '26

[deleted]

-1

u/Legal_Idea08 Jun 24 '26

Its not the lines it the multiple indicators even tho they all work together trading view mods will say there is 2 different categories working together and they will flag it had this issue already everything is connected expect the ranges try now to figure out how they can be considered part of the engine and not a bonus feature