Seuil de 50% entre deux points

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #240592 quote
    Alai-n
    Participant
    Veteran

    Bonjour,

     

    J’essais de faire déclencher une alerte(+1) lorsque le niveau que j’appelle “seuil” est touché. Ce niveau est défini ligne 9 et 12…

    Plus simplement je voudrais savoir comment récupérer le niveau de 50% entre le low[1] et high[3] ligne 7.

    J’espère être clair…

    Merci

    once surveillerachat=0
    //
    Signal = 0
    //
    AlerteFVG = 0
    // Formulation de l'algorithme Fair Value Gap High
    FVGHigh  = low[1]>high[3]
    //
    FVG50 = abs(low[1]-high[3]/2)
    // Représentation graphique Fair Value Gap High
    if FVGHigh then
    Seuil   = FVG50
    StopOut = FVG50
    Signal  = 1
    surveillerachat=1
    endif
    
    Validation   = low[1]<Seuil and close[1]>Seuil
    Invalidation = - (close[1]<Seuil)
    
    if surveillerachat=1 and Validation and not FVGHigh then
    AlerteFVG=1
    surveillerachat=0
    elsif surveillerachat=1 and Invalidation=-1 then
    surveillerachat=-1
    endif
    
    Return AlerteFVG as "AlerteFVG", Signal as "Signal", surveillerachat style(dottedline,1) as "surveillerachat"
    #240593 quote
    JC_Bywan
    Moderator
    Master

    Bjr,

    Si le but de la ligne 9 est de déterminer le milieu de low[1] et high[3], alors ce serait plutôt:

    FVG50 =(low[1]+high[3])/2

    Alai-n and Iván González thanked this post
    #240595 quote
    Alai-n
    Participant
    Veteran

    @JC_Bywan Tu es trop fort 😉 Merci

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

Seuil de 50% entre deux points


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Alai-n @alai-n Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Alai-n
1 year, 2 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 11/20/2024
Status: Active
Attachments: No files
Logo Logo
Loading...