Dr.Pip

Simple Moving Average Strategy

This is a modification of MOVINGAVG CROSS with different inputs of bar lengths that work with a great average percentage with not much drawdown. I ran the strategy tester with GBPUSD on 1 hour time frame.
Supprimer des scripts favoris Ajouter aux scripts favoris
strategy(title="Mbit Moving Average",overlay=true)

length = input(520)
confirmBars = input(27)
price = close
ma = sma(price, length)

bcond = price > ma

bcount = bcond ? nz(bcount[1]) + 1 : 0

scond = price < ma

scount = scond ? nz(scount[1]) + 1 : 0

long =  scount == confirmBars

short = bcount == confirmBars


//Strategy

strategy.entry("long", strategy.long, when=long)

strategy.entry("short",strategy.short, when=short)

Commentaires

How to add alert ? Thanks
+1 Répondre
Fantastic way to get nowhere fast and or blow your account
Répondre
Can I ask, what does repain mean??
Répondre
does it repaints?
Répondre
I think it doesn't repaint because it doesn't use future data for calculation.
Répondre
Sorry... It repaints... any strategy that uses renko in a backtest isn't tradable because it uses future data
Répondre
mykb Speed123
Thank you for the reply.
Répondre
Dr.Pip Speed123
No renko is used for this strategy, you can absolutely change it if you want. This strategy only uses a simple moving average to take trades and it does not repaint, it just sometimes has really long trades and can sometimes lead to large drawdown just look at the list of trades on the strategy tester. The last trade placed as of today was on 6/27/16
Répondre
Speed123 Dr.Pip
Thanks for the clarification. Good to know that it doesn't repaint.
Répondre
Accueil Screener d'actions Screener Forex Screener Crypto Calendrier économique Comment ça marche Caractéristiques du graphique Prix Parrainer un ami Règles de conduite Centre d'aide Solutions site web & courtier Widgets Solutions de cartographie Bibliothèque de graphiques allégés Blog & News Twitter
Profil Paramètres du Profil Compte et Facturation Amis référés Coins Mes tickets au support Centre d'aide Idées Publiées Followers Suivi(e) Messages privés Chat Se Déconnecter