MACD / Plus hauts plus bas
Forums › ProRealTime forum Français › Support ProBuilder › MACD / Plus hauts plus bas
- This topic has 21 replies, 2 voices, and was last updated 5 years ago by finplus.
-
-
11/24/2018 at 7:53 PM #8564611/24/2018 at 8:17 PM #8564811/26/2018 at 9:31 AM #85699
A cause d’un problème d’échelle, trop de décimales !
Le code ci-dessous devrait résoudre cela:
123456789101112131415161718192021222324252627282930313233343536373839404142434445/////////////////MACD IMPULSE ELDER////// variables// pc, fast ma, 12// pl, slow ma, 26// ps, signal, 9// p, exp ma EIS, 18// set first three as histogramspc=12pl=26ps=9p=13//periodos EISaa=exponentialaverage[p](close)cc=MACD[pc,pl,ps](close)// --- nicolasperiodSTD = 1000coeffSTD = 2// --- fin nicolasif aa > aa[1] and cc>cc[1] Thendd =cc/pipsizeelsedd=0endifif aa<aa[1] and cc < cc[1] thenee=cc/pipsizeelseee=0endifif ( aa <aa[1] and cc > cc[1]) or (aa>aa[1] and cc<cc[1]) thenff=cc*2elseff=0endifREM MACDhh=exponentialaverage[pc](close) - exponentialaverage[pl](close)REM Signalhh1=exponentialaverage[ps](hh)stdu = std[periodSTD](dd)*coeffSTDstdd = std[periodSTD](ee)*coeffSTDreturn stdu,0-stdd, dd COLOURED(0,255,0) as "elder impulsebuy", ee COLOURED(255,0,0) as "elder impulsesell", ff coloured(0,0,255) as "elder impulsechange", hh as "macd", hh1 as "signal macd", 0 as " zero "11/30/2018 at 7:44 PM #8611811/30/2018 at 7:44 PM #8612012/03/2018 at 11:47 AM #86243Bizarre, j’ai remodifié le code comme ci-dessous et il est bien compatible avec tous les instruments, forex en Yen ou non, ou même DAX, etc..
123456789101112131415161718192021222324252627282930313233343536373839404142434445/////////////////MACD IMPULSE ELDER////// variables// pc, fast ma, 12// pl, slow ma, 26// ps, signal, 9// p, exp ma EIS, 18// set first three as histogramspc=12pl=26ps=9p=13//periodos EISaa=exponentialaverage[p](close)cc=MACD[pc,pl,ps](close)// --- nicolasperiodSTD = 1000coeffSTD = 2// --- fin nicolasif aa > aa[1] and cc>cc[1] Thendd =ccelsedd=0endifif aa<aa[1] and cc < cc[1] thenee=ccelseee=0endifif ( aa <aa[1] and cc > cc[1]) or (aa>aa[1] and cc<cc[1]) thenff=cc*2elseff=0endifREM MACDhh=(exponentialaverage[pc](close) - exponentialaverage[pl](close))REM Signalhh1=exponentialaverage[ps](hh)stdu = std[periodSTD](dd)*coeffSTDstdd = std[periodSTD](ee)*coeffSTDreturn stdu,0-stdd, dd COLOURED(0,255,0) as "elder impulsebuy", ee COLOURED(255,0,0) as "elder impulsesell", ff coloured(0,0,255) as "elder impulsechange", hh as "macd", hh1 as "signal macd", 0 as " zero "J’ai bien les 2 lignes horizontales et les courbes MACD+Signal.
12/05/2018 at 6:54 PM #86374 -
AuthorPosts
Find exclusive trading pro-tools on
Similar topics: