Hello,
At the request of Ashley, I tried to backtest a strategy.
It was a failure on M15 and H1.
But the code works well for these conditions :
- H4 timeframe
- EUR/USD
- only long positions (works not great with shorts)
On H1, we must use “sell limit” instead of “buy stop”, it works with it !
So this code isn’t my best strategy of course, but the equity curve is sexy 🙂
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
// ASHLEY's strategy // EUR/USD H4 minicontracts EMA21 = exponentialaverage[21] EMA40 = exponentialaverage[40] EMA100 = exponentialaverage[100] n = 4 Ctime = time > 040000 and time < 200000 // ACHAT ca1 = EMA21 > EMA40 and EMA40 > EMA100 ca2 = EMA21 > EMA21[1] and EMA40 > EMA40[1] and EMA100 > EMA100[1] ca3 = low < EMA21 and close > EMA21 ca4 = close > open and close > close[1] and close > open[1] and open <= open[1] and open <= close[1] IF Ctime and ca1 and ca2 and ca3 and ca4 and not longonmarket THEN SL = close - low buy n shares at highest[1](high) stop ENDIF set stop loss SL set target profit SL * 1.5 |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :
Filename : download the ITF files
How to import ITF files into ProRealTime platform?
PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Hello,
Someone asked me something (his results seemed to be different) on my email, but it was a “donotreply” adress.
Here is my answer :
Hello,
There is no error, your backtest is true.
But you backtested it from april 2012, my backtest begins before 2000.
So the equity curved seemed to be different, but it’s the same for the same period.
See my picture here :
http://www.doctrading.fr/wp-content/uploads/2016/05/Ashley-1024×617.png
Best regards,
Marc
Not your best..So what is your best strategy? 🙂