buoingiorno a tutti
vorrei chiedervi se qualcuno ha trovato il modo di implementare i cicli di Hurst in un indicatore per prorealtime
saluti
Ho appena converto, da MT4, anche nel forum italiano. Non so se questa versione è adatta per la vostra applicazione? Se vedi altre versioni di codice disponibili su Internet, io sono disposto a guardare per cercare di convertirlo in ProRealTime.
https://www.prorealcode.com/topic/hurst-indicator-mt4-conversione/
Cia Nicolas , questo è il cilo di Hurst ma è da migliorare.
/////////////start/////////////
// k è il numero di barra contando da destra dalla quale far partire il ciclo
// n è il numero di cicli che si vogliono plottare
// wa è la lunghezza del ciclo in barre
// trend è il trend per definizione -1, 0 o +1
//K=N PER K E N USARE GLI STESSI VALORI
det=DPO[k*2](close)
c=(k-(n*wa))
if c<=0 then
c=k
flag2=0
endif
det2=DPO[c*2](close)
if det=det[1] and det[1]=det[2] and det[2]<>det[3] then
flag=1
endif
if det2=det2[1] and det2[1]=det2[2] and det2[2]<>det2[3] then
flag2=1
endif
if flag=0 then
hurst=undefined
elsif flag2=1 then
hurst=undefined
else
a=a+1
x=(360/wa)*a
phase=-90
w1=SIN(8*x+phase)
w2=2*SIN(4*x+phase)
w3=3*SIN(2*x+phase)
w4=4*SIN(x+phase)
ciclo=w1+w2+w3+w4
grc=0.01029
c=(grc*trend*1)
b=b+c
hurst=ciclo+b
endif
RETURN hurst
allego questo link magari può essere utile a qualcuno
http://tradingandsystems.altervista.org/hurt-cycle/
saluti
Bonjour
Quels sont les réglages par défaut préconisés ?
Merci
Avete già visto questo?
/////////////start/////////////
// k è il numero di barra contando da destra dalla quale far partire il ciclo
// n è il numero di cicli che si vogliono plottare
// wa è la lunghezza del ciclo in barre
// trend è il trend per definizione -1, 0 o +1
//K=N PER K E N USARE GLI STESSI VALORI
n=k
det=DPO[k*2](close)
c=(k-(n*wa))
if c<=0 then
c=k
flag2=0
endif
det2=DPO[c*2](close)
if det=det[1] and det[1]=det[2] and det[2]<>det[3] then
flag=1
endif
if det2=det2[1] and det2[1]=det2[2] and det2[2]<>det2[3] then
flag2=1
endif
if flag=0 then
hurst=undefined
elsif flag2=1 then
hurst=undefined
else
a=a+1
x=(360/wa)*a
phase=-90
w1=SIN(8*x+phase)
w2=2*SIN(4*x+phase)
w3=3*SIN(2*x+phase)
w4=4*SIN(x+phase)
ciclo=w1+w2+w3+w4
grc=0.01029
c=(grc*trend*1)
b=b+c
hurst=ciclo+b
endif
RETURN hurst