Breakout indicator

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

    Hello

    I’m trying to code the following breakout indicator :

    If it’s the first time  that the current candle closes upper/lower than the previous one after n candles, then i need a drawtext (BR after n candles)

    Ex: from 9h to 11h, every candle doesn’t close under the previous one, at 11h05 the indicator shows me the first close under the lowest of the previous one

    It also indicates me the number of candles where the breakout wasn’t active

    If you could help me, it should be very nice

     

    Reb

    #137740 quote
    Nicolas
    Keymaster
    Master

    Something like that?

    if close<lastclose or lastclose=0 then 
    ncandles=barindex-lastbar
    drawtext("BR - #ncandles#",barindex,lastclose,dialog,standard,20)
    lastclose=close
    lastbar=barindex
    endif
    
    return
    #138046 quote
    reb
    Participant
    Master

    Thks Nicolas

    You re the boss

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

Breakout indicator


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
reb @reb Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by reb
5 years, 7 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 06/30/2020
Status: Active
Attachments: No files
Logo Logo
Loading...