[go: up one dir, main page]

0% found this document useful (0 votes)
263 views1 page

New Text Document

The document outlines a trading algorithm called 'Custom Gainz Algo v2 Alpha' that utilizes Exponential Moving Averages (EMAs) and Average True Range (ATR) for generating buy and sell signals. It includes parameters for fast and slow EMA lengths, ATR length, and a multiplier for trailing stops. The algorithm plots the EMAs, entry signals, and trailing stop levels on a trading chart.

Uploaded by

ashvinvaghani222
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)
263 views1 page

New Text Document

The document outlines a trading algorithm called 'Custom Gainz Algo v2 Alpha' that utilizes Exponential Moving Averages (EMAs) and Average True Range (ATR) for generating buy and sell signals. It includes parameters for fast and slow EMA lengths, ATR length, and a multiplier for trailing stops. The algorithm plots the EMAs, entry signals, and trailing stop levels on a trading chart.

Uploaded by

ashvinvaghani222
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=5indicator("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 > emaSlowbearTrend = emaFast
< emaSlow// - ENTRY SIGNALS -buySignal = ta.crossover(emaFast, emaSlow)sellSignal =
ta.crossunder(emaFast, emaSlow)// - TRAILING STOP -longStop = close - atr *
multshortStop = 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(sellSignal, 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