Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //@version=6
- indicator("Reversal Strategy (Trade Your Edge)", shorttitle = "Reversal Strategy (Trade Your Edge)", overlay = true, max_lines_count = 500, max_boxes_count = 500, max_labels_count = 500, max_bars_back = 500)
- string GRP_PB = "Power Bars"
- float sensitivityInput = input.float(1.0, "Sensitivity", minval = 0.1, step = 0.1, group = GRP_PB, tooltip = "Minimum body size as a multiple of ATR. Higher values produce stricter detection and fewer Power Bars; lower values produce more frequent detection.")
- float bodyPctInput = input.float(75.0, "Body %", minval = 1.0, maxval = 100.0, step = 1.0, group = GRP_PB, tooltip = "Minimum percentage of the candle or sequence range that must be formed by the body. Controls how much wick activity is tolerated in a Power Bar.")
- bool singlePBInput = input.bool(true, "Power Bar Setups", group = GRP_PB, tooltip = "Toggle single candle Power Bar detection.")
- bool twoPBInput = input.bool(true, "2 Candle Power Bar Setups", group = GRP_PB, tooltip = "Toggle two candle Power Bar detection.")
- bool threePBInput = input.bool(true, "3 Candle Power Bar Setups", group = GRP_PB, tooltip = "Toggle three candle Power Bar detection.")
- string GRP_CZ = "Consolidation Zones"
- int consLengthInput = input.int(1, "Consolidation Length", minval = 0, group = GRP_CZ, tooltip = "Waiting period between zone creation and a valid breakout signal. The breakout bar must occur after the zone creation bar plus this value. Default 1 means the immediate next bar after zone creation cannot trigger the signal.")
- string GRP_SIG = "Signals"
- bool longSignalsInput = input.bool(true, "Long Signals", inline = "long", group = GRP_SIG, tooltip = "Enable or disable long signal generation and long trade tracking.")
- color longColorInput = input.color(#4CAF50, "", inline = "long", group = GRP_SIG)
- bool shortSignalsInput = input.bool(true, "Short Signals", inline = "short", group = GRP_SIG, tooltip = "Enable or disable short signal generation and short trade tracking.")
- color shortColorInput = input.color(#F23645, "", inline = "short", group = GRP_SIG)
- string GRP_TPSL = "Stop Loss & Take Profit"
- bool showTpLevelsInput = input.bool(true, "Take Profit Levels", inline = "tpl", group = GRP_TPSL, tooltip = "Toggle the dashed TP lines and right-side TP price labels.")
- color tpColorInput = input.color(#22AB94, "", inline = "tpl", group = GRP_TPSL)
- bool showTpLabelsInput = input.bool(true, "Take Profit Labels", inline = "tpm", group = GRP_TPSL, tooltip = "Toggle the TP outcome markers plotted on candles when TP levels are hit.")
- color tpMarkerColorInput = input.color(#2962FF, "", inline = "tpm", group = GRP_TPSL)
- bool showSlLevelsInput = input.bool(true, "Stop Loss Levels", inline = "sll", group = GRP_TPSL, tooltip = "Toggle the dashed SL line and right-side SL price label.")
- color slColorInput = input.color(#F23645, "", inline = "sll", group = GRP_TPSL)
- bool showSlLabelsInput = input.bool(true, "Stop Loss Labels", inline = "slm", group = GRP_TPSL, tooltip = "Toggle the SL outcome marker plotted on the candle when SL is hit.")
- color slMarkerColorInput = input.color(#F23645, "", inline = "slm", group = GRP_TPSL)
- string GRP_VIS = "Visualization"
- int smaLengthInput = input.int(20, "SMA Length", minval = 1, group = GRP_VIS, tooltip = "Period of the SMA used for trend classification and Power Bar gating. Also controls the plotted SMA when enabled.")
- bool showSmaInput = input.bool(true, "Enable SMA", inline = "sma", group = GRP_VIS, tooltip = "Toggle display of the SMA line on the chart.")
- color smaColorInput = input.color(color.aqua, "", inline = "sma", group = GRP_VIS)
- bool showPBColorInput = input.bool(true, "Power Bar Color", inline = "pbc", group = GRP_VIS, tooltip = "Toggle and customize the bar coloring for single candle Power Bars (bullish / bearish).")
- color pbBullColorInput = input.color(#00E676, "", inline = "pbc", group = GRP_VIS)
- color pbBearColorInput = input.color(#FF1744, "", inline = "pbc", group = GRP_VIS)
- bool showMultiColorInput = input.bool(true, "Multi-Candle Power Bar Color", inline = "mpc", group = GRP_VIS, tooltip = "Toggle and customize the bar coloring for two and three candle Power Bars (bullish / bearish).")
- color multiBullColorInput = input.color(#FF9800, "", inline = "mpc", group = GRP_VIS)
- color multiBearColorInput = input.color(#E91E63, "", inline = "mpc", group = GRP_VIS)
- bool showZonesInput = input.bool(true, "Consolidation Zones", group = GRP_VIS, tooltip = "Toggle the display of the Consolidation Zone boxes.")
- color bullZoneColorInput = input.color(color.new(#00E676, 85), "Bull Zone Color", group = GRP_VIS)
- color bearZoneColorInput = input.color(color.new(#FF1744, 85), "Bear Zone Color", group = GRP_VIS)
- string GRP_AL = "Alerts"
- bool alertLongInput = input.bool(true, "Long Signal", inline = "al1", group = GRP_AL, tooltip = "Toggle alerts for new long / short entries.")
- bool alertShortInput = input.bool(true, "Short Signal", inline = "al1", group = GRP_AL)
- bool alertTp1Input = input.bool(true, "TP 1", inline = "al2", group = GRP_AL, tooltip = "Toggle alerts for each respective TP level.")
- bool alertTp2Input = input.bool(true, "TP 2", inline = "al2", group = GRP_AL)
- bool alertTp3Input = input.bool(true, "TP 3", inline = "al2", group = GRP_AL)
- bool alertSlInput = input.bool(true, "SL", group = GRP_AL, tooltip = "Toggle alerts for Stop Loss hits.")
- int ATR_LENGTH = 14
- int REGIME_LOOKBACK = 10
- float REGIME_RATIO = 0.6
- float TWO_CANDLE_SCALE = 1.5
- float THREE_CANDLE_SCALE = 2.0
- float TP1_R = 1.0
- float TP2_R = 1.5
- float TP3_R = 2.0
- int LINE_EXT = 25
- color SIGNAL_TEXT_COLOR = color.white
- color MARKER_TEXT_COLOR = color.white
- color LABEL_BG_COLOR = color.new(color.black, 100)
- string CHECK_MARK = " ✅"
- type Zone
- box bx
- float top
- float bottom
- float sl
- int createdBar
- bool active = false
- type Trade
- int dir = 0
- int entryBar
- float sl
- float tp1
- float tp2
- float tp3
- bool hit1 = false
- bool hit2 = false
- bool hit3 = false
- bool active = false
- line slLine
- line tp1Line
- line tp2Line
- line tp3Line
- label slLabel
- label tp1Label
- label tp2Label
- label tp3Label
- f_price(float p) =>
- str.tostring(math.round_to_mintick(p))
- f_tpText(float p, bool hit) =>
- "TP " + f_price(p) + (hit ? CHECK_MARK : "")
- f_regime(float smaV, int len) =>
- int ups = int(nz(math.sum(smaV > smaV[1] ? 1 : 0, len)))
- int downs = int(nz(math.sum(smaV < smaV[1] ? 1 : 0, len)))
- float net = smaV - smaV[len]
- int need = math.ceil(len * REGIME_RATIO)
- int result = 0
- if not na(net)
- if net > 0 and ups >= need
- result := 1
- else if net < 0 and downs >= need
- result := -1
- result
- f_singlePB(bool isBull, float smaV, float atrV) =>
- float body = math.abs(close - open)
- float rng = high - low
- bool dirOk = isBull ? close > open : close < open
- bool sizeOk = not na(atrV) and body >= sensitivityInput * atrV
- bool ratioOk = rng > 0 and body / rng * 100.0 >= bodyPctInput
- bool crossOk = not na(smaV) and (isBull ? open < smaV and close > smaV : open > smaV and close < smaV)
- dirOk and sizeOk and ratioOk and crossOk
- f_multiPB(int n, bool isBull, float smaV, float atrV, float scale) =>
- float hi = ta.highest(high, n)
- float lo = ta.lowest(low, n)
- bool sameColor = nz(math.sum(isBull ? (close > open ? 1 : 0) : (close < open ? 1 : 0), n)) == n
- float seqOpen = open[n - 1]
- float smaStart = smaV[n - 1]
- float body = math.abs(close - seqOpen)
- float rng = hi - lo
- bool sizeOk = not na(atrV) and body >= sensitivityInput * atrV * scale
- bool ratioOk = rng > 0 and body / rng * 100.0 >= bodyPctInput
- bool crossOk = not na(smaV) and not na(smaStart) and (isBull ? seqOpen < smaStart and close > smaV : seqOpen > smaStart and close < smaV)
- bar_index >= n and sameColor and sizeOk and ratioOk and crossOk
- f_newZone(bool isBull, float top, float bottom, float sl, int startBar) =>
- box bx = na
- if showZonesInput
- color fillC = isBull ? bullZoneColorInput : bearZoneColorInput
- bx := box.new(left = startBar, top = top, right = bar_index, bottom = bottom, border_color = color.new(fillC, math.max(color.t(fillC) - 50, 0)), border_width = 1, xloc = xloc.bar_index, bgcolor = fillC)
- Zone.new(bx = bx, top = top, bottom = bottom, sl = sl, createdBar = bar_index, active = true)
- method extendTo(Zone this, int x) =>
- if not na(this.bx)
- this.bx.set_right(x)
- method remove(Zone this) =>
- box.delete(this.bx)
- this.active := false
- f_levelLine(int x1, int x2, float y, color c, bool show) =>
- line ln = na
- if show
- ln := line.new(x1 = x1, y1 = y, x2 = x2, y2 = y, xloc = xloc.bar_index, extend = extend.none, color = c, style = line.style_dashed, width = 1)
- ln
- f_levelLabel(int x, float y, string txt, color c, bool show) =>
- label lb = na
- if show
- lb := label.new(x = x, y = y, text = txt, xloc = xloc.bar_index, yloc = yloc.price, color = LABEL_BG_COLOR, style = label.style_label_left, textcolor = c, size = size.small, textalign = text.align_left)
- lb
- f_newTrade(int dir, float entry, float sl) =>
- float risk = math.abs(entry - sl)
- float tp1 = entry + dir * risk * TP1_R
- float tp2 = entry + dir * risk * TP2_R
- float tp3 = entry + dir * risk * TP3_R
- int x1 = bar_index
- int x2 = bar_index + LINE_EXT
- line slL = f_levelLine(x1, x2, sl, slColorInput, showSlLevelsInput)
- line tp1L = f_levelLine(x1, x2, tp1, tpColorInput, showTpLevelsInput)
- line tp2L = f_levelLine(x1, x2, tp2, tpColorInput, showTpLevelsInput)
- line tp3L = f_levelLine(x1, x2, tp3, tpColorInput, showTpLevelsInput)
- label slB = f_levelLabel(x2, sl, "SL " + f_price(sl), slColorInput, showSlLevelsInput)
- label tp1B = f_levelLabel(x2, tp1, f_tpText(tp1, false), tpColorInput, showTpLevelsInput)
- label tp2B = f_levelLabel(x2, tp2, f_tpText(tp2, false), tpColorInput, showTpLevelsInput)
- label tp3B = f_levelLabel(x2, tp3, f_tpText(tp3, false), tpColorInput, showTpLevelsInput)
- Trade.new(dir = dir, entryBar = bar_index, sl = sl, tp1 = tp1, tp2 = tp2, tp3 = tp3, active = true, slLine = slL, tp1Line = tp1L, tp2Line = tp2L, tp3Line = tp3L, slLabel = slB, tp1Label = tp1B, tp2Label = tp2B, tp3Label = tp3B)
- method deletePlan(Trade this) =>
- line.delete(this.slLine)
- line.delete(this.tp1Line)
- line.delete(this.tp2Line)
- line.delete(this.tp3Line)
- label.delete(this.slLabel)
- label.delete(this.tp1Label)
- label.delete(this.tp2Label)
- label.delete(this.tp3Label)
- method setPlanEnd(Trade this, int x2) =>
- if not na(this.slLine)
- this.slLine.set_x2(x2)
- if not na(this.tp1Line)
- this.tp1Line.set_x2(x2)
- if not na(this.tp2Line)
- this.tp2Line.set_x2(x2)
- if not na(this.tp3Line)
- this.tp3Line.set_x2(x2)
- if not na(this.slLabel)
- this.slLabel.set_x(x2)
- if not na(this.tp1Label)
- this.tp1Label.set_x(x2)
- if not na(this.tp2Label)
- this.tp2Label.set_x(x2)
- if not na(this.tp3Label)
- this.tp3Label.set_x(x2)
- method markTp(Trade this, int idx) =>
- if idx == 1
- this.hit1 := true
- if not na(this.tp1Label)
- this.tp1Label.set_text(f_tpText(this.tp1, true))
- else if idx == 2
- this.hit2 := true
- if not na(this.tp2Label)
- this.tp2Label.set_text(f_tpText(this.tp2, true))
- else
- this.hit3 := true
- if not na(this.tp3Label)
- this.tp3Label.set_text(f_tpText(this.tp3, true))
- f_signalLabel(int dir) =>
- bool isLong = dir == 1
- label.new(x = bar_index, y = isLong ? low : high, text = isLong ? "Long" : "Short", xloc = xloc.bar_index, yloc = isLong ? yloc.belowbar : yloc.abovebar, color = isLong ? longColorInput : shortColorInput, style = isLong ? label.style_label_up : label.style_label_down, textcolor = SIGNAL_TEXT_COLOR, size = size.small)
- float smaValue = ta.sma(close, smaLengthInput)
- float atrValue = ta.atr(ATR_LENGTH)
- int regimeRaw = f_regime(smaValue, REGIME_LOOKBACK)
- bool bullSingleRaw = f_singlePB(true, smaValue, atrValue)
- bool bearSingleRaw = f_singlePB(false, smaValue, atrValue)
- bool bullTwoRaw = f_multiPB(2, true, smaValue, atrValue, TWO_CANDLE_SCALE)
- bool bearTwoRaw = f_multiPB(2, false, smaValue, atrValue, TWO_CANDLE_SCALE)
- bool bullThreeRaw = f_multiPB(3, true, smaValue, atrValue, THREE_CANDLE_SCALE)
- bool bearThreeRaw = f_multiPB(3, false, smaValue, atrValue, THREE_CANDLE_SCALE)
- var int lastPBEnd = -1
- bool bullSingle = singlePBInput and bullSingleRaw
- bool bearSingle = singlePBInput and bearSingleRaw
- bool bullTwo = twoPBInput and bullTwoRaw and not bullSingle and bar_index - 1 > lastPBEnd
- bool bearTwo = twoPBInput and bearTwoRaw and not bearSingle and bar_index - 1 > lastPBEnd
- bool bullThree = threePBInput and bullThreeRaw and not bullSingle and not bullTwo and bar_index - 2 > lastPBEnd
- bool bearThree = threePBInput and bearThreeRaw and not bearSingle and not bearTwo and bar_index - 2 > lastPBEnd
- bool bullPB = bullSingle or bullTwo or bullThree
- bool bearPB = bearSingle or bearTwo or bearThree
- int pbLen = bullSingle or bearSingle ? 1 : bullTwo or bearTwo ? 2 : bullThree or bearThree ? 3 : 0
- if bullPB or bearPB
- lastPBEnd := bar_index
- float hi2 = math.max(high, high[1])
- float hi3 = math.max(hi2, high[2])
- float lo2 = math.min(low, low[1])
- float lo3 = math.min(lo2, low[2])
- float pbHigh = pbLen == 1 ? high : pbLen == 2 ? hi2 : pbLen == 3 ? hi3 : na
- float pbLow = pbLen == 1 ? low : pbLen == 2 ? lo2 : pbLen == 3 ? lo3 : na
- float pbMid = (pbHigh + pbLow) / 2.0
- float pbAnchorLow = pbLen == 1 ? low : pbLen == 2 ? low[1] : pbLen == 3 ? low[2] : na
- float pbAnchorHigh = pbLen == 1 ? high : pbLen == 2 ? high[1] : pbLen == 3 ? high[2] : na
- int pbStartBar = bar_index - math.max(pbLen, 1) + 1
- int regimeAtPB = pbLen == 1 ? nz(regimeRaw[1]) : pbLen == 2 ? nz(regimeRaw[2]) : pbLen == 3 ? nz(regimeRaw[3]) : 0
- bool bullSetup = bullPB and regimeAtPB == -1 and longSignalsInput and barstate.isconfirmed
- bool bearSetup = bearPB and regimeAtPB == 1 and shortSignalsInput and barstate.isconfirmed
- color pbBarColor = showPBColorInput and bullSingle ? pbBullColorInput : showPBColorInput and bearSingle ? pbBearColorInput : showMultiColorInput and (bullTwo or bullThree) ? multiBullColorInput : showMultiColorInput and (bearTwo or bearThree) ? multiBearColorInput : na
- color pbPrevColor = showMultiColorInput and (bullTwo or bullThree) ? multiBullColorInput : showMultiColorInput and (bearTwo or bearThree) ? multiBearColorInput : na
- color pbPrev2Color = showMultiColorInput and bullThree ? multiBullColorInput : showMultiColorInput and bearThree ? multiBearColorInput : na
- var Zone bullZone = Zone.new()
- var Zone bearZone = Zone.new()
- var Trade activeTrade = Trade.new()
- bool tp1Hit = false
- bool tp2Hit = false
- bool tp3Hit = false
- bool slHit = false
- int eventDir = 0
- float tp1HitPx = na
- float tp2HitPx = na
- float tp3HitPx = na
- float slHitPx = na
- if activeTrade.active and bar_index > activeTrade.entryBar
- bool isLong = activeTrade.dir == 1
- eventDir := activeTrade.dir
- bool slTouched = isLong ? low < activeTrade.sl : high > activeTrade.sl
- if slTouched
- slHit := true
- slHitPx := activeTrade.sl
- activeTrade.active := false
- activeTrade.setPlanEnd(bar_index)
- else
- if not activeTrade.hit1 and (isLong ? high > activeTrade.tp1 : low < activeTrade.tp1)
- activeTrade.markTp(1)
- tp1Hit := true
- tp1HitPx := activeTrade.tp1
- if not activeTrade.hit2 and (isLong ? high > activeTrade.tp2 : low < activeTrade.tp2)
- activeTrade.markTp(2)
- tp2Hit := true
- tp2HitPx := activeTrade.tp2
- if not activeTrade.hit3 and (isLong ? high > activeTrade.tp3 : low < activeTrade.tp3)
- activeTrade.markTp(3)
- tp3Hit := true
- tp3HitPx := activeTrade.tp3
- if activeTrade.hit3
- activeTrade.active := false
- activeTrade.setPlanEnd(bar_index)
- if activeTrade.active
- activeTrade.setPlanEnd(bar_index + LINE_EXT)
- int tpHitCount = (tp1Hit ? 1 : 0) + (tp2Hit ? 1 : 0) + (tp3Hit ? 1 : 0)
- bool longSignal = false
- bool shortSignal = false
- float signalStop = na
- if barstate.isconfirmed
- if bullZone.active and bar_index > bullZone.createdBar
- if close < bullZone.bottom
- bullZone.remove()
- else if close > bullZone.top and bar_index > bullZone.createdBar + consLengthInput
- bullZone.active := false
- bullZone.extendTo(bar_index)
- if close > bullZone.sl
- longSignal := true
- signalStop := bullZone.sl
- else
- bullZone.extendTo(bar_index)
- if bearZone.active and bar_index > bearZone.createdBar
- if close > bearZone.top
- bearZone.remove()
- else if close < bearZone.bottom and bar_index > bearZone.createdBar + consLengthInput
- bearZone.active := false
- bearZone.extendTo(bar_index)
- if close < bearZone.sl
- shortSignal := true
- signalStop := bearZone.sl
- else
- bearZone.extendTo(bar_index)
- if longSignal and shortSignal
- shortSignal := false
- signalStop := bullZone.sl
- if bullSetup
- if bullZone.active
- bullZone.remove()
- bullZone := f_newZone(true, pbHigh, pbMid, pbAnchorLow, pbStartBar)
- if bearSetup
- if bearZone.active
- bearZone.remove()
- bearZone := f_newZone(false, pbMid, pbLow, pbAnchorHigh, pbStartBar)
- if longSignal or shortSignal
- int newDir = longSignal ? 1 : -1
- activeTrade.deletePlan()
- activeTrade := f_newTrade(newDir, close, signalStop)
- f_signalLabel(newDir)
- barcolor(pbBarColor, title = "Power Bar Color")
- barcolor(pbPrevColor, offset = -1, title = "Multi-Candle Power Bar Color (2nd)")
- barcolor(pbPrev2Color, offset = -2, title = "Multi-Candle Power Bar Color (3rd)")
- plot(showSmaInput ? smaValue : na, "SMA", color = smaColorInput, linewidth = 1)
- plotshape(showTpLabelsInput and eventDir == 1 and tpHitCount == 1, "TP (Long)", shape.xcross, location.abovebar, tpMarkerColorInput, text = "TP", textcolor = MARKER_TEXT_COLOR, size = size.tiny)
- plotshape(showTpLabelsInput and eventDir == 1 and tpHitCount == 2, "TP x2 (Long)", shape.xcross, location.abovebar, tpMarkerColorInput, text = "TP x2", textcolor = MARKER_TEXT_COLOR, size = size.tiny)
- plotshape(showTpLabelsInput and eventDir == 1 and tpHitCount == 3, "TP x3 (Long)", shape.xcross, location.abovebar, tpMarkerColorInput, text = "TP x3", textcolor = MARKER_TEXT_COLOR, size = size.tiny)
- plotshape(showTpLabelsInput and eventDir == -1 and tpHitCount == 1, "TP (Short)", shape.xcross, location.belowbar, tpMarkerColorInput, text = "TP", textcolor = MARKER_TEXT_COLOR, size = size.tiny)
- plotshape(showTpLabelsInput and eventDir == -1 and tpHitCount == 2, "TP x2 (Short)", shape.xcross, location.belowbar, tpMarkerColorInput, text = "TP x2", textcolor = MARKER_TEXT_COLOR, size = size.tiny)
- plotshape(showTpLabelsInput and eventDir == -1 and tpHitCount == 3, "TP x3 (Short)", shape.xcross, location.belowbar, tpMarkerColorInput, text = "TP x3", textcolor = MARKER_TEXT_COLOR, size = size.tiny)
- plotshape(showSlLabelsInput and slHit and eventDir == 1, "SL (Long)", shape.circle, location.belowbar, slMarkerColorInput, text = "SL", textcolor = MARKER_TEXT_COLOR, size = size.tiny)
- plotshape(showSlLabelsInput and slHit and eventDir == -1, "SL (Short)", shape.circle, location.abovebar, slMarkerColorInput, text = "SL", textcolor = MARKER_TEXT_COLOR, size = size.tiny)
- string ALERT_PREFIX = "Reversal Strategy (Trade Your Edge) | " + syminfo.ticker + " | "
- if alertLongInput and longSignal
- alert(ALERT_PREFIX + "Long Signal @ " + f_price(close) + " | SL " + f_price(activeTrade.sl) + " | TP1 " + f_price(activeTrade.tp1) + " | TP2 " + f_price(activeTrade.tp2) + " | TP3 " + f_price(activeTrade.tp3), alert.freq_once_per_bar_close)
- if alertShortInput and shortSignal
- alert(ALERT_PREFIX + "Short Signal @ " + f_price(close) + " | SL " + f_price(activeTrade.sl) + " | TP1 " + f_price(activeTrade.tp1) + " | TP2 " + f_price(activeTrade.tp2) + " | TP3 " + f_price(activeTrade.tp3), alert.freq_once_per_bar_close)
- if alertTp1Input and tp1Hit
- alert(ALERT_PREFIX + "TP 1 Hit @ " + f_price(tp1HitPx), alert.freq_once_per_bar)
- if alertTp2Input and tp2Hit
- alert(ALERT_PREFIX + "TP 2 Hit @ " + f_price(tp2HitPx), alert.freq_once_per_bar)
- if alertTp3Input and tp3Hit
- alert(ALERT_PREFIX + "TP 3 Hit @ " + f_price(tp3HitPx), alert.freq_once_per_bar)
- if alertSlInput and slHit
- alert(ALERT_PREFIX + "SL Hit @ " + f_price(slHitPx), alert.freq_once_per_bar)
- alertcondition(alertLongInput and longSignal, "Long Signal", "Reversal Strategy (Trade Your Edge): Long Signal on {{ticker}} @ {{close}}")
- alertcondition(alertShortInput and shortSignal, "Short Signal", "Reversal Strategy (Trade Your Edge): Short Signal on {{ticker}} @ {{close}}")
- alertcondition(alertTp1Input and tp1Hit, "TP 1", "Reversal Strategy (Trade Your Edge): TP 1 Hit on {{ticker}}")
- alertcondition(alertTp2Input and tp2Hit, "TP 2", "Reversal Strategy (Trade Your Edge): TP 2 Hit on {{ticker}}")
- alertcondition(alertTp3Input and tp3Hit, "TP 3", "Reversal Strategy (Trade Your Edge): TP 3 Hit on {{ticker}}")
- alertcondition(alertSlInput and slHit, "SL", "Reversal Strategy (Trade Your Edge): SL Hit on {{ticker}}")
Advertisement
Add Comment
Please, Sign In to add comment