Breakout indicator

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #137708 quote
    rebreb
    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
    NicolasNicolas
    Keymaster
    Legend

    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
    rebreb
    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.
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

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 rebreb
6 years, 3 months ago.

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