Indicateur de consolidation / V10.3

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #12283 quote
    SofitechSofitech
    Participant
    Master

    Bonjour Nicolas,
    J’aimerais pouvoir créer un indicateur “Flat base consolidation” basé sur le screener ci-dessous :
    http://www.prorealcode.com/prorealtime-market-screeners/flat-base-consolidation/

    L’idée serait d’avoir un indicateur en intraday, identifiant les périodes de consolidations sur x bars (peu importe le timeframe ou que les chandeliers soient en ticks).
    Le nombre de bars pourrait être un variable à adapter pour chacun, avec une première hypothèse à 5 par exemple.

    En V10.3, cet indicateur permettrait de positionner une ligne haute et basse.

    #12286 quote
    NicolasNicolas
    Keymaster
    Legend

    Bonjour,

    Cela ressemble à une partie du screener que j’ai codé suite à cette demande, sur les leaders de marché: http://www.prorealcode.com/topic/screener-leader-de-marche/

    En repartant de la condition c2 de cet indicateur, on peut élaborer soit la détection d’une consolidation en pourcentage comme c’est déjà le cas et sur les x dernières bougies donc:

    x = 10 //consolidation period
    percent = 2 //max percentage range of consolidation 
    
    c2=(highest[x](high)-lowest[x](low))<=close*(percent/100)

    Ou sur un range en pips/points avec cette version:

    x = 10 //consolidation period
    range = 20 //max pips/points range of consolidation 
    
    c2=(highest[x](high)-lowest[x](low))<=range*pointsize

    Ensuite on test c2 et si le booléen est vrai, alors on pourra afficher les highest et lowest qui symbolise la consolidation:

    x = 10 //consolidation period
    percent = 2 //max percentage range of consolidation 
    
    c2=(highest[x](high)-lowest[x](low))<=close*(percent/100)
    
    if c2 then 
     haut = highest[x](high)
     bas = lowest[x](low)
    else
     haut = 0
     bas = 0
    endif

    Il faut retourner ‘haut’ et ‘bas’ dans un RETURN et mettre ces valeurs en mode points pour l’esthétique du graphique.

    #12290 quote
    SofitechSofitech
    Participant
    Master

    C’est facile quand Nicolas intervient.. donc la il manque juste :

    RETURN haut as “haut”, bas as “bas”

    Correct ?

    C’est valable sur V3 uniquement ?

    #12299 quote
    NicolasNicolas
    Keymaster
    Legend

    Oui, ça marchera à la fois sur 10.2 et 10.3. Je n’ai pas testé, fait nous savoir si tout est ok.

    #12367 quote
    SofitechSofitech
    Participant
    Master

    ok, avec l’instruction :
    RETURN haut as “haut”, bas as “bas”

    L’indicateur fonctionne parfaitement.

    Merci !

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

Indicateur de consolidation / V10.3


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Sofitech @sofitech Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by SofitechSofitech
10 years ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 08/27/2016
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...