Indicator based on Hieken Ashi

Forums ProRealTime English forum ProBuilder support Indicator based on Hieken Ashi

Viewing 5 posts - 1 through 5 (of 5 total)
  • #143864

    Hi, need support in creating a simple indicator with following criteria:

    If at least one of the last 5 Hieken Ashi candles have body size 20% of its total length, return true.

    Colour of the candle doesn’t matter.

    Thanks a million in advance.

    #143865

    The below code should do the job.

     

    1 user thanked author for this post.
    #143866

    Thanks Nicolas.

    #143871

    There you go:

    you asked for “body is 20%”, but his would almost never return a true value, since being exactly 20% is so rare, if not impossible!   So I added >= so that any candle that is equal to or exceeds 20% returns true. Should you want to be returned when the body is <= 20% just replace “>” with “<“.

    The returned values are 0 to 5 (0=none, 1…5=the number of candles that match your criterion). With the indicator properties you may select either a line or a histogram.

     

    #143872

    I was  writing while Nicolas posted.

    Better two than none!

    You can see two different ways of setting up the HA candlesticks.

     

Viewing 5 posts - 1 through 5 (of 5 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login