Hello All,
I found a strategy on Internet, and tried to backtest us.
As it didn’t work, I did some modification to the rules.
Those ones are very simple, so I don’t detail them.
I set some interesting moving averages (5, 8, 89, some of the Fibonacci numbers).
The trades are closed at 21 PM.
This strategy plays the consolidations on trends.
It is very effective since 10 years, not before.
It works on EUR/USD and GBP/USD.
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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
DEFPARAM CumulateOrders = False // TAILLE DES POSITIONS LEVIER = 10 REINV = 0 IF REINV = 0 THEN n = LEVIER ELSIF REINV = 1 THEN n = (10000+strategyprofit)/10000*LEVIER ENDIF // INDICATEURS MM5 = WilderAverage[5](close) MM8 = WilderAverage[8](close) MM89 = Average[89](close) // REINITIALISATION IF time = 210000 THEN condachat = 0 condvente = 0 ENDIF // ACHAT Ctime1 = time >= 010000 and time <= 090000 ca1 = close > MM5 and MM5 > MM8 and MM8 > MM89 ca2 = MM5 > MM5[1] and MM8 > MM8[1] and MM89 > MM89[1] IF Ctime1 and ca1 and ca2 THEN condachat = 1 ENDIF Ctime2 = time >= 090000 and time < 210000 IF Ctime2 and condachat = 1 THEN IF close < MM8 THEN buy n shares at market ENDIF ENDIF // VENTE Ctime1 = time >= 010000 and time <= 090000 ca1 = close < MM5 and MM5 < MM8 and MM8 < MM89 ca2 = MM5 < MM5[1] and MM8 < MM8[1] and MM89 < MM89[1] IF Ctime1 and ca1 and ca2 THEN condvente = 1 ENDIF Ctime2 = time >= 090000 and time < 210000 IF Ctime2 and condvente = 1 THEN IF close > MM8 THEN buy n shares at market ENDIF ENDIF IF time = 210000 THEN sell at market exitshort at market ENDIF // SL & TP set stop loss 0.0030 set target profit 0.0030 |
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 :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
There is an error with the code.As you see, there are no short positions.Because I did set “buy”, I should have written “sellshort”.
But the results are worse with the sellshort !
Hi Doc,
thanks for the code, I tried his on backtest on Dax, and the result is like you. But that don’t work on ProOrder Auto trading. Could you say me why please?
Other question, i tried to change code to have shorts positions but that simply replace all “buy positions” by all “shorts positions”. what line should i change? Have you repaired the code?
Thank you
Hello benjamin,
Modification have to be done line 52. Replace BUY by SELLSHORT.
Hi Benjamin.
do you have an IG account?…i have your same problem…don’t works in Pro Order…
Hi all,
I didn’t try it with ProOrder, as I don’t find this strategy very performing, compared to my own strategies.
I don’t know why it doesn’t work on ProOrder, it should.
You are right, there is a mistale on line 52.
I will test it with ProOrder, and check the codeBest Regards,
Ok thank you for your answers. Gianpiero, i have an Interactive brokers account. Noisette, i will test with modification. Doctrading, your strategy is with little drawdown, it’s interesting.
It works on ProOrder – but I don’t like the maxWin = MaxLoss.
Just divise StopLoss /2 – Result is better