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