MACD / Plus hauts plus bas

Viewing 7 posts - 16 through 22 (of 22 total)
  • Author
    Posts
  • #85646 quote
    finplusfinplus
    Participant
    Master

    Impeccable. ça marche pour les indices mais pas pour les paire forex. Une autre idée ? Merci.

    #85648 quote
    finplusfinplus
    Participant
    Master

    ça fonctionne aussi pour les paires en yen (AUD JPY/ USD JPY/ EUR JPY,…..) le brent et l’or…mais pas pour les paires forex autres que celles en yen ….

    #85699 quote
    NicolasNicolas
    Keymaster
    Legend

    A cause d’un problème d’échelle, trop de décimales !

    Le code ci-dessous devrait résoudre cela:

    /////////////////MACD IMPULSE ELDER////
    // variables
    // pc, fast ma, 12
    // pl, slow ma, 26
    // ps, signal, 9
    // p, exp ma EIS, 18
    // set first three as histograms
    pc=12
    pl=26
    ps=9
    p=13//periodos EIS
    aa=exponentialaverage[p](close)
    cc=MACD[pc,pl,ps](close)
    // --- nicolas
    periodSTD = 1000
    coeffSTD = 2
    // --- fin nicolas
    
    
    if aa > aa[1] and cc>cc[1] Then
    dd =cc/pipsize
    else
    dd=0
    endif
    if aa<aa[1] and cc < cc[1] then
    ee=cc/pipsize
    else
    ee=0
    endif
    if ( aa <aa[1] and cc > cc[1]) or (aa>aa[1] and cc<cc[1]) then
    ff=cc*2
    else
    ff=0
    endif
    REM MACD
    hh=exponentialaverage[pc](close) - exponentialaverage[pl](close)
    
    REM Signal
    hh1=exponentialaverage[ps](hh)
    
    stdu = std[periodSTD](dd)*coeffSTD
    stdd = std[periodSTD](ee)*coeffSTD
    
    
    return 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 "
    #86118 quote
    finplusfinplus
    Participant
    Master

    alors voilà le résultat : les lignes horizontales apparaissent mais les lignes MACD et de signal MACD ont disparu (je pense qu’il s’agit d’un problème d’échelle). j’ai fait une copie écran mais je n’arrive pas à l’insérer.

    Capture-d’écran-2018-11-30-à-19.39.50.png Capture-d’écran-2018-11-30-à-19.39.50.png
    #86120 quote
    finplusfinplus
    Participant
    Master

    et bien si. La capture écran est bien là.

    #86243 quote
    NicolasNicolas
    Keymaster
    Legend

    Bizarre, 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..

    /////////////////MACD IMPULSE ELDER////
    // variables
    // pc, fast ma, 12
    // pl, slow ma, 26
    // ps, signal, 9
    // p, exp ma EIS, 18
    // set first three as histograms
    pc=12
    pl=26
    ps=9
    p=13//periodos EIS
    aa=exponentialaverage[p](close)
    cc=MACD[pc,pl,ps](close)
    // --- nicolas
    periodSTD = 1000
    coeffSTD = 2
    // --- fin nicolas
    
    
    if aa > aa[1] and cc>cc[1] Then
    dd =cc
    else
    dd=0
    endif
    if aa<aa[1] and cc < cc[1] then
    ee=cc
    else
    ee=0
    endif
    if ( aa <aa[1] and cc > cc[1]) or (aa>aa[1] and cc<cc[1]) then
    ff=cc*2
    else
    ff=0
    endif
    REM MACD
    hh=(exponentialaverage[pc](close) - exponentialaverage[pl](close))
    
    REM Signal
    hh1=exponentialaverage[ps](hh)
    
    stdu = std[periodSTD](dd)*coeffSTD
    stdd = std[periodSTD](ee)*coeffSTD
    
    
    return 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.

    #86374 quote
    finplusfinplus
    Participant
    Master

    Impeccable. Merci pour cette réalisation et pour l’aide.

Viewing 7 posts - 16 through 22 (of 22 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

MACD / Plus hauts plus bas


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
finplus @finplus Participant
Summary

This topic contains 21 replies,
has 2 voices, and was last updated by finplusfinplus
7 years, 9 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 11/09/2018
Status: Active
Attachments: 4 files
ProRealCode ProRealCode
Loading...