Moyenne adaptive 50% DARVAS

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #31015 quote
    supertitisupertiti
    Participant
    Master

    Bonjour j’aimerai “normaliser” pour qu’elle colle aux prix  cette moyenne partant de deux codes : les boites de Darvas et la KAMA

    merci pour votre aide

    // MOYENNE ADAPTIVE BOITE DE DARVAS
    
    // BOITES de DARVAS
    //***Darvas Boxes Code by courtesy of Sohocool
    if box=1 and (high>db100 or low<db0) then
    box=0
    flag=0
    endif
    if box=0 and flag=0 and low>low[3] and low[1]>low[3] and low[2]>low[3] then
    th=low[3]
    flag=1
    endif
    if flag=1 and box=0 and low<th then
    flag=0
    endif
    if flag=1 and box=0 and high<high[3] and high[1]<high[3] and high[2]<high[3] then
    db100=high[3]
    db0=th
    box=1
    endif
    once db100=undefined
    once db0=undefined
    temp=db100-db0
    //db23=db0+0.236*temp
    //db38=db0+0.382*temp
    db50=db0+0.5*temp
    //db62=db0+0.618*temp
    //db78=db0+0.786*temp
    //////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////
    //KAMA   Kaufman Adaptiv Moning Average  …………PRT
    ONCE ama = UNDEFINED
    signal = ABS(MOMENTUM[p])
    noise = SUMMATION[p](ABS(MOMENTUM[1]))
    IF noise>0 THEN
    er = signal / noise
    ELSE
    er=1
    ENDIF
    fastsc = 2 / (2+ 1)
    slowsc = 2 / (30 + 1)
    factor = SQUARE(er * (fastsc - slowsc) + slowsc)
    IF BARINDEX = p THEN
    ama = CLOSE
    ELSIF BARINDEX > p THEN
    ama = ama + factor * (CLOSE - ama)
    ENDIF
    // Variable :  p = 30
    ////////////////////////////////////////////////////
    Mabdd = ama * ( db50 )
    
    Return  MABDD as " MABDD "
    
    MABDD.jpg MABDD.jpg
    #31197 quote
    NicolasNicolas
    Keymaster
    Legend

    J’aimerai comprendre la demande. Tu multiplies la valeur de la boîte de Darvas avec la valeur de la moyenne mobile adaptive KAMA appliquée au Close à la ligne 50.. pour quoi faire ?

    Le but est d’utiliser le calcul de la KAMA sur la valeur 50% des boîtes ? Si oui alors, il ne faut pas calculer la KAMA sur le Close mais bien sur cette valeur, merci de me confirmer 🙂

    #31239 quote
    supertitisupertiti
    Participant
    Master

    cette demande est sans intérêt en fin de compte, j’ai réussi ce que je voulais mais cela ne correspond pas du tout à l’idée que je m’en faisais !

    je pensais que cela ressemblerai à une sorte de moyenne pondérée mais nada c’est pas bon du tout.

    merci de t’y être interéssé.

    Bonne journée.

Viewing 3 posts - 1 through 3 (of 3 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

Moyenne adaptive 50% DARVAS


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
supertiti @supertiti Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by supertitisupertiti
9 years, 5 months ago.

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