Dépassement du plut haut de la dernière heure

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #40512 quote
    JulienGarcia
    Participant
    New

    Bonjour,

     

    Je souhaiterais savoir comment détecter le dépassement du plus haut ou du plus bas de la dernier période ( m5, m15, h1, h4, d1 ), et qu’il me l indique par une bougie vert ou rouge.

     

    merci

    #40955 quote
    Nicolas
    Keymaster
    Master

    J’ai modifié un code de Noobywan que j’ai retrouvé dans ce topic: https://www.prorealcode.com/topic/finding-hourly-highslows-using-1-min-data/

    // Hourly highs/lows using 1 min data responding to a request on PRC
    //
    // (but could also work for other timeframes lower than 1h, as long as each hourly candle and each lower timeframe candle end simultaneously, otherwise the code would be more complicated than this one - Noobywan)
    if OpenHour<>OpenHour[1] then
    barinit=intradaybarindex
    endif
    
    Maxthishour=highest[max(1,intradaybarindex-barinit+1)](high)
    Minthishour=lowest[max(1,intradaybarindex-barinit+1)](low)
    
    if high > Maxthishour[1] then
    drawcandle(open,high,low,close) coloured(0,255,200)
    elsif low < Minthishour[1] then
    drawcandle(open,high,low,close) coloured(200,0,0)
    //else
    //drawcandle(open,high,low,close)
    endif
    
    return //Maxthishour as "Maxthishour", Minthishour as "Minthishour"

    On colorie en bleu ciel le breakout du plus haut de l’heure courante et en rouge pour le plus bas. Cela te convient ?

    last-hour-high-low-breakout.png last-hour-high-low-breakout.png
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Dépassement du plut haut de la dernière heure


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Nicolas
8 years, 7 months ago.

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