indicateur Multi timeframe

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #231658 quote
    alex62948
    Participant
    New

    Bonjour,

    Concernant la programmation d’indicateurs personnalisés, je bloque sur un problème avec l’indicateur ADR%, que je n’arrive pas à résoudre.

    Bien que j’utilise exactement les mêmes formules avec séparation des timeframes, avec l’instruction TIMEFRAME(daily), je n’obtiens pas le même résultat du calcul de l’ADR% sur l’UT daily et l’UT H1.

    Voir l’exemple de calcul ci-joint sur l’action américaine RANI.

    Auriez-vous une solution à cette question ?

    // indicator ADR%
    
    TIMEFRAME(daily)
    
    adr = 100*((((high/low)+(high[1] / low[1])+(high[2] / low[2])+(high[3] / low[3])+(high[4] / low[4])+(high[5] / low[5])+(high[6] / low[6])+(high[7] / low[7])+(high[8] / low[8])+(high[9] / low[9])+(high[10] / low[10])+(high[11] / low[11])+(high[12] / low[12])+(high[13] / low[13])+(high[14] / low[14])+(high[15] / low[15])+(high[16] / low[16])+(high[17] / low[17])+(high[18] / low[18])+(high[19] / low[19]) )/20) -1)
    
    return adr
    
    ADR.png ADR.png
    #231668 quote
    fifi743
    Participant
    Master

    en H1 tu as assez unité ?

    #231671 quote
    fifi743
    Participant
    Master

    il y avait ce code de JC

     

    
    period = 20
    
    sum = 0
    for i = 0 to period-1 do
     sum=sum+(dhigh(i)/dlow(i))
    next
    
    adrP = 100*(sum/period-1)
    
    return adrP
    JC_Bywan thanked this post
    #231675 quote
    alex62948
    Participant
    New

    Merci beaucoup fifi743, la formule que tu m’as donnée fonctionne bien, il n’y a quasiment plus de différence entre les calculs sur Daily et H1

    Belle journée

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

indicateur Multi timeframe


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
alex62948 @alex62948 Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by alex62948
1 year, 10 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 04/18/2024
Status: Active
Attachments: 1 files
Logo Logo
Loading...