ajouter une bande de Keltner

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

    Bonjour

    je souhaiterais ajouter une bande de Keltner sur le graphique ci-après mais je n’y arrive pas. Quelqu’un peut m’aider svp ?

    Merci

    // — settings

    Myrsi = RSI[14](close) //RSI_period
    Moy50RSI = average[50](Myrsi)
    mbb = average[7](myrsi)
    period = 10

     

    if (myrsi > mbb) then
    drawcandle (mbb,mbb, Myrsi, Myrsi) coloured (32,0,192)
    elsif (Myrsi < mbb) then
    drawcandle (mbb,mbb, Myrsi, Myrsi) COLOURED (255,0,0)
    endif

    return mbb as “mbb”, 70 as “70”, 30 as “30”

    #240215 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    C’est le code, mais vous ne pourrez pas bien voir les deux, car ils ont des échelles différentes, car vous faites correspondre le RSI, qui est sur une échelle de 1 à 100, avec le prix qui, par exemple sur le DAX, est sur une échelle de 0 à près de 20 000.
    Si vous laissez le graphique sur l’échelle des prix, vous verrez, très bas, à un prix compris entre 1 et 100, toutes les autres données sous la forme d’une seule ligne horizontale illisible.
    Si vous élargissez beaucoup le graphique pour l’aligner sur l’échelle 1-100 RSI, vous ne verrez plus les prix, car ils sont beaucoup plus élevés.

    // — settings
    Myrsi = RSI[14](close) //RSI_period
    Moy50RSI = average[50](Myrsi)
    mbb = average[7](myrsi)
    period = 10
    if (myrsi > mbb) then
       drawcandle (mbb,mbb, Myrsi, Myrsi) coloured (32,0,192)
    elsif (Myrsi < mbb) then
       drawcandle (mbb,mbb, Myrsi, Myrsi) COLOURED (255,0,0)
    endif
    //
    ONCE p  = 10                     //Keltner periods
    UpperK  = KeltnerBandUp[p]
    MedianK = KeltnerBandCenter[p]
    LowerK  = KeltnerBandDown[p]
    RETURN UpperK AS "Upper Band",LowerK AS "Lower Band",MedianK AS "Central Band",mbb as "mbb", 70 as "70", 30 as "30"
    Iván González thanked this post
    #240216 quote
    finplusfinplus
    Participant
    Master

    merci.

    oui en effet, il y a un problème d’échelle.

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

ajouter une bande de Keltner


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
finplus @finplus Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by finplusfinplus
1 year, 11 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 11/10/2024
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...