// Greeffer's Donchian Channel Study
// @version=4
//@Greeffer
// S T U D Y
// study(shorttitle="Greeffer's Study", title="Greeffer's Donchian Channel Study", overlay=true)
// S T R A T E G Y
strategy(
"Greeffer's Donchian Channel Strategy",
"Greeffer's Strategy",
overlay=true,
pyramiding=10,
default_qty_type=strategy.percent_of_equity,
default_qty_value=150,
initial_capital=5000,
commission_type=strategy.commission.percent,
commission_value=0.1,
margin_long=1./30*50,
margin_short=1./30*50
)
// I N P U T S
sma = input(title="sma", type=input.integer, defval=250)
symbol = "BTCUSDT" //symbol = "ETHUSDT"
var upperAmount = 0.001
var lowerAmount = 0.001
crossMiddle = false
volumeMA = input(title="volume ma period", type=input.integer, defval=200)
volMultiplyer = input(title="volume multiplyer", type=input.integer, defval=3)
donchianupper = input(title="upper donchian channel", type=input.integer, defval=1440)
donchianlower = input(title="lower donchian channel", type=input.integer, defval=1440)
takeprofit = input(title="take profit", type=input.float, defval=1000.00, step=0.01)
stops = input(title="stops", type=input.float, defval=500.00, step=0.01)
// V A R S
short = false
long = false
stopshort = close + stops
stoplong = close - stops
//----------------------?
//symbol = syminfo.ticker
// D O N C H I A N C H A N N E L S
lower = lowest(donchianlower)
upper = highest(donchianupper)
middle= (upper-lower)/2+lower
plot(middle, title='Middle', color=color.green, linewidth=1)
plot(upper, title='Upper', color=color.orange, linewidth=1)
plot(lower, title='Lower', color=color.orange, linewidth=1)
// S M A
plot(sma(close,sma))
// V O L U M E
volMA = sma(volume, 200)
//upperVol = highest(volume, 200)
upperVol = volMA*volMultiplyer
// E N T R Y / E X I T C o n d i t i o n s
// S h o r t
if high>=upper and volume>upperVol
short:=true
else
short:=false
// L o n g :
if low<=lower and volume>upperVol
long:=true
else
long:=false
// O R D E R S :
TP = takeprofit * 100
strategy.entry("short", strategy.short, limit=upper, stop=1, when=short)
strategy.entry("long", strategy.long, limit=lower, stop=1, when=long)
strategy.exit("tp-short", from_entry="short", profit=TP)
strategy.exit("tp-long", from_entry="long", profit=TP)
Overview
Greeffer's Donchian Channel Strategy places limit orders to sell at the upper band after a high touches it and to buy at the lower band after a low touches it, when volume exceeds a multiple of its moving average. A fixed-distance take profit is attached. Pyramiding of up to ten entries is allowed and no stop loss is applied.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
sma
int
250
sma
volume ma period
int
200
volumeMA
volume multiplyer
int
3
volMultiplyer
upper donchian channel
int
1440
donchianupper
lower donchian channel
int
1440
donchianlower
take profit
float
1000.00
takeprofit
stops
float
500.00
stops
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
This strategy identifies volume-based rebound signals on the price chart. It detects three or more consecutive lower volume candles followed by a higher volume candle, with price remaining lower from the start of the volume sequence, signaling potential long e
This strategy trades the DOT/BTC pair on a one-minute chart. It plots the VWAP of the close and two offset VWAP bands on the price chart. It opens a long when the open is above the upper band and a short when the open is below the lower band, then closes those
Calculates standard Bollinger Bands and identifies band expansion breakouts where upper and lower bands move in opposite directions. It enters long positions when price breaks above the upper band with a high candle body percentage, and enters short positions
The Chained Linear Regression Reversal Strategy plots linear regression channels with upper and lower standard deviation bands directly on the price chart across a user-defined time window. When price breaks out of the static channel for a confirmed number of
This strategy identifies breakout momentum by combining Bollinger Bands and Keltner Channels with volume confirmation. It opens long positions when the upper Keltner Channel crosses above the upper Bollinger Band and volume exceeds its moving average. Converse
This intraday strategy implements Mark Fisher's Opening Range Breakout (ORB) methodology tailored for index futures like ES and NQ. It calculates session opening ranges, volume z-scores, and VWAP bands to plot support, resistance, and confirmation levels on th