This system originates from many articles by Enrico Malverti published here: http://www.enricomalverti.com/2015/09/i-trading-systems-parte-5/.
Many trading systems are more stable if you use simple and not so innovative indicators, like exponential moving averages and Relative Strengthe index.
Differently by the original article:
- there is no ATR Filter, but we have introduced a Schaff Indicator. If you have multiple shares/commodities to choose, prefer what has a better value of Schaff;
- there is no fixed stop loss but a second moving average (fast), used as target. There are also Emas on lows (trailing stop loss for long) and a Emas on highs (trailing stop loss for short position).
Be careful, in the system only long case, because being short is not the reverse of being long (also indicators have a different behaviour – https://sauciusfinance.altervista.org/why-going-short-is-immoral-and-dangerous/)
Emas oh highs are only graphically put.
BUY when prices crosses over Ema on long period (we suggest, however, Ema long = Ema fast period = no. 14)
SELL when
- prices go under Ema on lows (7 period), or under on Ema fast!
- RSI crosses under level 70 or is higher than 75 (or 80, but in code there is 75)
Proposal for negotiations techniques:
- intraday place order with no limit, for buying after half stock exchange day , while for close already after 1/3
- otherwise you can operate “end-of-day” (and expecially for Borsa Italiana, use limited prices).
For tradingview, see: https://it.tradingview.com/script/JkM2Annl/
//@version= 4
// see www.enricomalverti.com , trading system 2015
// https://sauciusfinance.altervista.org
strategy(title=”EMA Malverti RSI long only”, overlay = true, max_bars_back=500)
// NON AGGIUNTO SCHAFF INDICATOR, che serve per discriminare quali titoli scegliere dallo screener (segnale già aperto o il primo o, a parità,
//quello più alto) ==> Tolte le bande di Bollinger (che filtrano “poco”)
// INPUTS
emapf = input(10, title =”Ema periodo veloce”, minval=1, step = 1)
emapl = input(20, title =”Ema periodo lungo”, minval=1, step = 1)
emaps = input(7, title =”Ema periodi stop”, minval=1, step = 1)
rsi_period = input(11, title=”RSI period”, minval = 1, step = 1)
// CALCULATIONS
emaf = ema(close, emapf)
emal = ema(close, emapl)
// rsi
myrsi = rsi(close, rsi_period)
//ema stop long ed ema stop short
//Ema7 messo da “massimo” a “chiusura” come target per posizioni short. Il limite è sempre ema20 (più restringente – asimmetria)
// in questo t.s., lo short viene soltanto indicato come “rappresentazione grafica”, non agito
emass = ema(close, emaps)
emasl = ema(low, emaps)
/// Entry
strategy.entry(“Long”, true, when = crossover(close,emal))
rsi1 = crossunder(myrsi,70)
rsi2 = myrsi > 75
// previously, 80
st_loss_long = crossunder(close,emasl)
target_long= crossunder(close,emaf)
// exits. Long: Target if over bandamax, loss if under bandamin. Viceversa, for short
strategy.close(“Long”, when = rsi1, comment=”crossunder RSI”)
strategy.close(“Long”, when = rsi2, comment =”RSI MAX”)
strategy.close(“Long”, when = st_loss_long, comment = “Stop loss”)
strategy.close(“Long”, when = target_long, comment = “target_long” )
plot(emasl, color=#363A45, linewidth= 1, style=plot.style_cross, title=”stop loss”)
plot(emaf, color=#FF0000, linewidth= 1, title=”ema low”)
plot(emal, color=#0000FF, linewidth= 2, title=”ema fast”)
plot(emass, color=#787B86,linewidth= 1, style=plot.style_cross, title=”stop short”)
Schaff indicator has been added below for filtering shares when you have multiple indications: you select the title with Schaff buy-signal active (green bullet in Tradingview) with the HIGHEST value, because buyers have already shown relative power yet and therefore there is much more potential for increasing prices.