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
You must be logged in to post a comment.
Ciao, ho già provato ma non ho avuto risultati buoni. Se trovo qualcosa ti faccio sapere.
Ciao, vorrei utilizzare e ottimizzare una delle due sulla coppia eurusd. Nella strategia di break out hai inserito nei commenti dei valori per alcune coppie di valute. A che cosa si riferiscono ? Grazie
non so su eurusd ma forse modificando qualcosa potrebbe funzionare con altre coppie. Se vuoi prova ad ottimizzare il Lowest e Highest e i controlli sulle barre daily (dclose) , oppure sostituire la media mobile con un altro indicatore ma non aggiungerne altri perchè il rischio di overfitting è alto.
Se scopri qualcosa fammi sapere...
Hello,
On NZDUSD, this is profitable since August 2010.
On AUDNZD, the system is profitable since August 2009.
Congratulations and thanks for your share and your work !
salve qualcuno l ha provata in reale come sta andando???
bel lavoro comunque grazie