Using the same code for both strategies, only reversing BUY with SELLSHORT and SELLSHORT with BUY.
– AUDNZD 4H Reversal
– NZDUSD 4H Breakout
You look in the system: daily closings, breaking a max or min of X days, range, strength of the candle, moving average.
if you find the best parameters for this strategy would be grateful! 🙂
I wrote this also thanks to the support of the staff of ProRealTime,
Gianluca
Italy(BS)
//BreakOut NZDUSD 4H
DEFPARAM CUMULATEORDERS=FALSE
max5 = HIGHEST[5](HIGH)
min5 = LOWEST[5](LOW)
REM posizione long
IF dclose(1)>dclose(2) and dclose(2)>dclose(3) and low=min5 and close>open and range>range[1] and close>((high+low)/2) THEN
IF CLOSE>Average[100](close) THEN
BUY 1 SHARE AT MARKET
endif
endif
REM posizione short
if dclose(1)<dclose(2) and dclose(2)<dclose(3) and HIGH=max5 and close<open and range>range[1] and close<((high+low)/2) THEN
IF CLOSE<Average[100](close) THEN
sellSHORT 1 SHARE at market
endif
endif
IF LONGONMARKET AND (BARINDEX - TRADEINDEX ) =6 THEN
sell AT MARKET
ENDIF
IF SHORTONMARKET AND (BARINDEX - TRADEINDEX ) =6 THEN
EXITSHORT AT MARKET
ENDIF
SET TARGET %PROFIT 1.5
SET STOP %LOSS 2.5