Extended Bar Indicator

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #18157 quote
    pompiuses
    Participant
    New

    Can someone help me create an indicator that finds candles which are bigger than two times the ATR(14) from high to low on the 1h timeframe? If it’s possible to highlight the candle somehow that’d also be nice. I plan to use the indicator with the alarm in ProRealtime to get notified every time such a candle occur. Thanks!

    #18162 quote
    Nicolas
    Keymaster
    Master

    What prorealtime version are you using? I’m asking because with 10.3 you could highlight the candlesticks with a specific color or even draw symbols on chart for a clear visual information. As for version 10.2, I can only draw a dot above or below the candlestick or make a signal histogram in an indicator just below the chart.

    For that last version the code should be:

    c1 = range>averagetruerange[14]*2
    
    RETURN c1

    Not tested, please give feedback.

    #18182 quote
    pompiuses
    Participant
    New

    Thank you for the quick reply. I use version 10.2 through IG Markets.

    #18284 quote
    pompiuses
    Participant
    New

    I’ve now tested the indicator and it seems to work ok. But I how can I get the candlestick highlighted (e.g. blue dot above)?

    #18286 quote
    Nicolas
    Keymaster
    Master

    To add a dot on main chart, you’ll need to add another indicator on price, the test is the same, but the code is slightly different:

    c1 = range>averagetruerange[14]*2
    
    if c1 then 
     signal = low-2*pipsize
    else
     signal = 0
    endif 
    
    return signal
    #18291 quote
    pompiuses
    Participant
    New

    I added it as a separate indicator, but I got no dots on the chart. I tried to color it red, but only the indicator below the chart was colored. Also is it possible to get Prorealtime to print debug info so I can see the value of the “signal” variable?

    #18294 quote
    Nicolas
    Keymaster
    Master

    Please add a price chart indicator on price with the wrench on the upper left side of the price chart: http://www.prorealcode.com/topic/coding-an-indicator-on-the-price-chart/

    #18301 quote
    pompiuses
    Participant
    New

    Ah I see. That made the chart look like in the attachment.

    #18311 quote
    Nicolas
    Keymaster
    Master

    Please set lines as points, like the screenshot I put on my previous post. 

    You’re welcome.

    #18326 quote
    pompiuses
    Participant
    New

    Ok I got it to work now, but I also had to check “Vertical autoscaling : use price only”. Thanks!

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

Extended Bar Indicator


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
pompiuses @pompiuses Participant
Summary

This topic contains 9 replies,
has 2 voices, and was last updated by pompiuses
9 years, 1 month ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 12/09/2016
Status: Active
Attachments: No files
Logo Logo
Loading...