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.
Hilangkan dari Skrip-Skrip Favorit Tambahkan ke Skrip-Skrip Favorit
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)
How to add alert ? Thanks
Jawab
Can I ask, what does repain mean??
Jawab
does it repaints?
Jawab
I think it doesn't repaint because it doesn't use future data for calculation.
Jawab
Sorry... It repaints... any strategy that uses renko in a backtest isn't tradable because it uses future data
Jawab
mykb Speed123
Thank you for the reply.
Jawab
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
Jawab
Speed123 Dr.Pip
Thanks for the clarification. Good to know that it doesn't repaint.
Jawab
Beranda Penyaring Saham Penyaring Forex Penyaring Crypto Kalender Ekonomi Bagaimana Cara Kerjanya Fitur-Fitur Chart Harga Akun Tata Tertib Moderator Solusi Website & Broker Widget-Widget Solusi Charting Dapatkan Bantuan Permintaan Fitur Blog & Berita Yang Sering di Tanyakan Wiki Twitter
Profil Pengaturan Profil Akun dan Penagihan Dapatkan Bantuan Ide Terpublikasikan Pengikut Telah Mengikuti Pesan Pribadi Obrolan Keluar