Non ho ben capito se la strategia in oggetto di Juanj sia un indicatore, o una strategia, nel caso di indicatore, come aggiungerci una strategia?
Grazie
Si quindi io ho la strategia, ma come mai mi entra a mercato all’inizio del test e esce alla fine, praticamente fa un entrata e una uscita.
Grazie
Io l’ho provata sul DAX, Giornaliero, entra ed esce moltissime volte.
Prova ad usare più unità.
Io lo sto provando sul DAX 15 minuti e mi entra ma immediatamente viene cancellato.
Grazie
Ti allego il file che ho usato io, senza cambiare niente (ho solo messo i valori delle variabili FISSI, per non fargli fare il test).
Non so perchè ma da un po di tempo, non riesco a caricare file ITF, la cosa succede da quando ho pulito il PC.
Ecco il codice che ho usato:
defparam cumulateorders = false
once cDIVMFI = 0
once cDIVRSI = 0
once cDIVMOM = 0
td = opendayofweek >=1 and opendayofweek <= 5
tt = time >= 080000 and time <= 210000
mbr = 1
n = 40
//.................................................................................................................
DIVMFI = MoneyFlowIndex[14]
IF (BarIndex > n) THEN
IF (DIVMFI[1]>DIVMFI AND DIVMFI[1]>DIVMFI[2]) THEN
extremumMFI2=DIVMFI[1]
extremumMFI1=highest[n](DIVMFI)
preciomaxMFI2=close[1]
preciomaxMFI=Highest[n](close)
IF(extremumMFI2<extremumMFI1 AND preciomaxMFI2>preciomaxMFI[1]) THEN
for i=mbr to n
if DIVMFI[i]=extremumMFI1 then
cDIVMFI = 1
Endif
next
Endif
Endif
Endif
//.................................................................................................................
DIVRSI = RSI[14](close)
IF (BarIndex > n) THEN
IF (DIVRSI[1]>DIVRSI AND DIVRSI[1]>DIVRSI[2]) THEN
extremumRSI2=DIVRSI[1]
extremumRSI1=highest[n](DIVRSI)
preciomaxRSI2=close[1]
preciomaxRSI=Highest[n](close)
IF(extremumRSI2<extremumRSI1 AND preciomaxRSI2>preciomaxRSI[1]) THEN
for i=mbr to n
if DIVRSI[i]=extremumRSI1 then
cDIVRSI = 1
Endif
next
Endif
Endif
Endif
//.................................................................................................................
DIVMOM = Momentum[12](close)
If (BarIndex > n) THEN
If (DIVMOM[1]>DIVMOM AND DIVMOM[1]>DIVMOM[2]) THEN
extremumMOM2=DIVMOM[1]
extremumMOM1=highest[n](DIVMOM)
preciomaxMOM2=close[1]
preciomaxMOM=Highest[n](close)
If(extremumMOM2<extremumMOM1 AND preciomaxMOM2>preciomaxMOM[1]) THEN
for i=mbr to n
If DIVMOM[i]=extremumMOM1 then
cDIVMOM = 1
Endif
next
Endif
Endif
Endif
//.................................................................................................................
IF td and tt then
IF cDIVMFI = 1 and cDIVRSI = 1 and cDIVMOM = 1 then
buy at market
ENDIF
ENDIF
IF onmarket then
cDIVMFI = 0
cDIVRSI = 0
cDIVMOM = 0
ENDIF
set stop ploss 40
set target pprofit 40
Ho provato per un mese e sembra che questo nuovo sia peggio, inoltre il precedente sembra funzionare adesso.
Grazie