Dessiner segments sur niveau de prix rond

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #103465 quote
    EtopsEtops
    Participant
    Junior

    Bonjour,

    Je suis un peu débutant dans ce langage, et je test actuellement la v11 beta.

    Je souhaite ajouter un indicateur simple sur le graph des prix qui dessine un segment horizontal sur les niveaux de prix rond autour du prix courant (pour les paires forex que je trade).

    Exemple :

    EUR/USD est à 1.1142, je souhaite dessiner un segment horizontal (sur x dernières bougies et x bougies après la bougie actuelle) sur les niveaux de prix 1.1100 et 1.1200

    Vous feriez ça comment ?

    Merci !

    #103466 quote
    NicolasNicolas
    Keymaster
    Legend
    #103469 quote
    EtopsEtops
    Participant
    Junior

    Merci !

    Première tentative avec ce code :

    defparam drawonlastbaronly=true
    
    start = round(close[1]*100)/100 //start price
    step = 0.01 //price step
    quantity = 2 //lines quantity
    
    i = start
    while i < start+(step*quantity) do
    drawhline(i) coloured(0,0,0,90)
    i=i+step
    wend
    while i > start-(step*quantity) do
    drawhline(i) coloured(0,0,0,90)
    i=i-step
    wend
    
    return start

    Je fais un “return start” pour voir ce que ça donne sous le graph, et ça semble bon, mais je ne sais pas comment basculer ça sur le graphique en lui même…

    christophe11560 thanked this post
    Annotation-2019-07-25-141655.png Annotation-2019-07-25-141655.png
    #103471 quote
    EtopsEtops
    Participant
    Junior

    Ah si j’ai trouvé ! Génial merci !

    Annotation-2019-07-25-142009.png Annotation-2019-07-25-142009.png
Viewing 4 posts - 1 through 4 (of 4 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

Dessiner segments sur niveau de prix rond


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Etops @etops Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by EtopsEtops
7 years, 1 month ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 07/25/2019
Status: Active
Attachments: 2 files
ProRealCode ProRealCode
Loading...