In my last desk (Saucius Bands or Triangular Moving Average Bands with parameters 9, 0.09) I experience the necessity of introducing faster line.
So I’ve added to the screen the Saucius Bands based upon a very short period: 4, 0.01 (less than a half previous period and no “enlargment” of bands).
I’ve used the code of the “Saucius Bands Easy” that, like a fast Keltner Channel, simply exit long when close overcome upperband and then, viceversa, reverse and short, when price undergoes the lower one.
Halfband in setting 4,0.01 is no more useful.
“Previous” bands (Saucius TMA Bands) are used for “reading” data in a “wider view”: that’s like Roboadvisory. For an easy example, if the trading system 8based upon 4,0.01) suggets you to go short, then if close is also under halfband or lower band for setting 9,0.09 then you have a strong signal.
Improvements:
- Before taking a position, after a long/short signal, wait after the half of the next day (in Eu market I usually wait 4 pm , a hour after US market). This is really a good filter for false signals;
- Leave position when CCI is at extreme values (> 200 or < -200);
- Take very care of “trigger” bar’s high and low (where you have the registered a signal for entering the market): if close breaks high/low, it’s hard to imagine a good wayout in profit for your long/short position (in this sense what suggested before, in the firts bullet, is very useful).
Observation:
Using a Keltner Channel on the same fast period but with a different multiplier (4, 0.04) – strategy is, by default, avaible in Tradingview) you may obtain very similar results than using a “fast” Saucius Band “easy” strategy.
The different nature of the 2 system is in the purple circle: both system use only upper and lower bands for taking and leaving position, they have similar volatility, but Keltner close position a bit in late than Saucius Bands, even if Saucius Bands make more “mistakes”. Using raw trading system, you may test that Saucius TMA Bands bring better results.
CODES (FOR TRADINGVIEW)
—– Saucius Triangular Moving Average Bands easy strategy ————— (*this system express the “long” and “short” arrows on the desk )
//@version= 2
strategy(title="Saucius Bands easy strategy",overlay = true,max_bars_back=750)
Length = input(4, minval=1)
m = input(0.01, minval = 0.01, step = 0.01)
// 4 and 0.01 are strong values
// profit and loss are in points!!!!!!
l1 = Length/2
l2 = round(l1)
l3 = Length – l2
TRIMH = sma(sma(high, l2), l3)
TRIML = sma(sma(low, l2), l3)
xHighBand = (1+m/100) * TRIMH
xLowBand = (1-m/100) * TRIML
// middleband : for stop only for short
TRIMM = sma(sma(close, l2), l3)
middleband = (1+m/200) * TRIMM
strategy.entry("Long", true, when=crossover(close,xHighBand))
strategy.entry("Short", false, when=crossunder(close,xLowBand))
// different ways for exiting (Long is the "dominant" with fix target)
strategy.exit("exitS", "Short", when=crossover(close,middleband))
strategy.exit("exitL", "Long", when=crossunder(close,xLowBand))
halfband = (xHighBand+xLowBand)/2
plot(xHighBand, color=green, title="High Band saucius")
plot(xLowBand, color=orange, title="Low Band saucius")
plot(middleband, color=blue, title="middleband saucius")
plot(halfband, color=purple, title="halfband saucius")
————————— “Revenge trading system” long/ short OR Saucius TMA Bands with classic parameters 9, 0.09 ————————————–
//@version=4
////////////////////////////////////////////////////////////
// Copyright by Saucius, 2019
////////////////////////////////////////////////////////////
// Revenge trading system using triangular moving averages (Saucius Bands)
// this time also long and short
// based upon version #1 of the Revenge t.s. Saucius
//////////////////////////////////////////////////
strategy(title="Revenge t.s. Saucius Long Short",overlay = true,max_bars_back=1000)
Length = input(9, minval=1)
m = input(0.9, minval = 0.1, step = 0.1)
l1 = Length/2
l2 = round(l1)
l3 = Length – l2
TRIMH = sma(sma(high, l2), l3)
TRIML = sma(sma(low, l2), l3)
xHighBand = (1+m/100) * TRIMH
xLowBand = (1-m/100) * TRIML
halfband = (xHighBand + xLowBand)/2
// classical entry long
strategy.entry("Long", true, when=crossover(close,xHighBand))
// entry #2 long from the botton: 2 closes upon inferior band
entry2 = close[2]<xLowBand[2] and close[1]>xLowBand[1] and close>xLowBand
strategy.entry("Long", true, when= entry2)
// exit 2 is not considered, since the experience from the long case onyl brings lower results
strategy.close("Long", when=crossunder(close, xHighBand))
strategy.close("Long", when=crossunder(close, halfband))
strategy.close("Long", when=crossunder(close, xLowBand))
//
CCIX = cci(close,20)
strategy.close("Long", when= (CCIX > 200 ))
//// ***Short cases addition**
// classical entry short (no. 1) is not considered, since they are often throwback to the halfband (similar, like my 3.8 trading system
// it plays a role like 20-period moving average)
// entry short #2 short from the top (inverse of the long rule)
entrysh = close[2]>xHighBand[2] and close[1]<xHighBand[1] and close<xHighBand
strategy.entry("Short", false, when= entrysh)
// exit short: crossover one of the lines or extreme point of CCI
strategy.close("Short", when=crossover(close,xLowBand))
strategy.close("Short", when=crossover(close,halfband))
strategy.close("Short", when=crossover(close,xHighBand))
strategy.close("Short", when= (CCIX < -200 ))
———–– Kelter Channel strategy is avaible by default on tradingview –———–
//@version=2
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 28/08/2018
// The Keltner Channel, a classic indicator
// of technical analysis developed by Chester Keltner in 1960.
// The indicator is a bit like Bollinger Bands and Envelopes.
//
// WARNING:
// – This script to change bars colors.
////////////////////////////////////////////////////////////
study(title="Keltner Channel Strategy", overlay = true)
nPeriod = input(title="Period", type=integer, defval=10, minval=1)
xPrice = sma(hlc3, nPeriod)
xMove = sma(high – low, nPeriod)
xUpper = xPrice + xMove
xLower = xPrice – xMove
pos = iff(close < xLower, -1,
iff(close > xUpper, 1, nz(pos[1], 0)))
barcolor(pos == -1 ? red: pos == 1 ? green : blue )
plot(xPrice, color=blue, title="KSmid")
plot(xUpper, color=red, title="KSup")