Here is a simple code that I was curious to test.
It applies on EUR/USD, H1 timeframe (other pairs / timeframes should be profitable).
We go LONG if :
ADX50 > 10
DI+(50) > DI-(50)
low of the candle < Bollinger20(down) and close > Bollinger20(up)
SL : 60 pips
TP : 10 pips
We go SHORT if we meet the opposite conditions.
So it’s a scalping strategy. Test and improve !
Best regards,
Defparam Cumulateorders = false
n = 5
// ACHAT
ca1 = ADX[50] > 10
ca2 = DIplus[50](close) > DIminus[50](close)
ca3 = low < BollingerDown[20](close) and close > BollingerDown[20](close)
IF ca1 AND ca2 AND ca3 THEN
BUY n SHARES AT MARKET
ENDIF
// VAD
cv1 = ADX[50] > 10
cv2 = DIplus[50](close) < DIminus[50](close)
cv3 = high > BollingerUp[20](close) and close < BollingerUp[20](close)
IF cv1 AND cv2 AND cv3 THEN
SELLSHORT n SHARES AT MARKET
ENDIF
// Stops et objectifs
SET STOP pLOSS 60
SET TARGET pPROFIT 10
You must be logged in to post a comment.
Hi Doc,
Firstly, thanks alot for this code. I have applied it to EUR/USD 3min frame & from 1 September to 15/10/2016 great results so far. I increased TP to 15 & got slightly better results over the same period.
My only question when looking through the results, the max profit accross all trades both short & long was $750 . But the loss of worst trade was $3,000.
I am an absolute beginner so i am not sure what the reason behind this but any comments would be appreciated.
Cheers JB
Thanks
Hello, this strategy improves with the SL 30 and the TP 10. I have done backtesting and it works better. regards