KEMBAR78
Super Signal | PDF
0% found this document useful (0 votes)
381 views1 page

Super Signal

This document is a TradingView Pine Script for a custom trading algorithm called 'Custom Gainz Algo v2 Alpha'. It utilizes Exponential Moving Averages (EMAs) for trend detection and generates buy/sell signals based on crossovers, while also implementing trailing stops based on the Average True Range (ATR). The script includes customizable input parameters for EMA lengths and ATR multiplier, and visualizes the signals and stops on the chart.

Uploaded by

aa7456lie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
381 views1 page

Super Signal

This document is a TradingView Pine Script for a custom trading algorithm called 'Custom Gainz Algo v2 Alpha'. It utilizes Exponential Moving Averages (EMAs) for trend detection and generates buy/sell signals based on crossovers, while also implementing trailing stops based on the Average True Range (ATR). The script includes customizable input parameters for EMA lengths and ATR multiplier, and visualizes the signals and stops on the chart.

Uploaded by

aa7456lie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

//@version=5

indicator("Custom Gainz Algo v2 Alpha", overlay=true)

// INPUTS
fastLength = input.int(14, title="Fast EMA Length")
slowLength = input.int(50, title="Slow EMA Length")
atrLength = input.int(14, title="ATR Length")
mult = input.float(1.5, title="ATR Multiplier", step=0.1)

// INDICATORS
emafast = ta.ema(close, fastLength)
emaslow = ta.ema(close, slowLength)
atr = ta.atr(atrLength)

// TREND LOGIC
bullTrend = emafast > emaslow
bearTrend = emafast < emaslow

// ENTRY SIGNALS
buysignal = ta.crossover(emafast, emaslow)
sellsiganl = ta.crossunder(emafast, emaslow)

// TRAILING STOP
longstop = close - atr * mult
shortstop = close + atr * mult

// PLOT EMAS
plot(emafast, color=color.teal, title="Fast EMA")
plot(emaslow, color=color.orange, title="Slow EMA")

// PLOT SIGNALS
plotshape(buysignal, title="Buy Signal", location=location.belowbar,
color=color.green, style=shape.labelup, text="Buy")
plotshape(sellsiganl, title="Sell Signal", location=location.abovebar,
color=color.red, style=shape.labeldown, text="Sell")

// PLOT STOPS
plot(bullTrend ? longstop : na, title="Long Stop", color=color.green,
style=plot.style_linebr)
plot(bearTrend ? shortstop : na, title="Short Stop", color=color.red,
style=plot.style_linebr)

You might also like