Indicator for highs/lows in a range

Forums ProRealTime English forum ProBuilder support Indicator for highs/lows in a range

Viewing 4 posts - 1 through 4 (of 4 total)
  • #234108

    Hi,

    I’m looking for an indicator which indicates the following:

    – The high/lows of max. 6 candles and min. of 2 candles within a range of 2 points (8 ticks)

    If the highs/lows of 1 of the 6 candles is out of range (more than 2 points of the high/low of candle 1), then this candle is not part of the indicator calculation.

    – The trigger for the indicator is: it should counting after a reversal candle is being created

     

    For example: 

    1. If the highs of 6 candles within the range of 2 points, then if will indicate the highest candle

    2. if the highs of 4 candles within the range of 2 points, then if will indicate the highest candle. 

    If the fifth candle is more than 2 points than candle 1, then the fifth candle will not be part of calculation and the sixth candle will automatically also not be part of the calculation.

    3. After the sixth candle the calculation for the indicator will start again.

     

    Attached 2 screenshots:

    In screenshot 1 a reversal candle is being created and then the indicator should be triggered and check the last 6 candles for the lowest low within the range of 2 points.

     

    In screenshot 2 a reverse candle is being created and then the indicator should be triggered and the last 6 candles should be checked. The high of the 4th candle is more than 2 points higher than the high of candle 1, it should not be part of the indicator calculation. In this situation, candle 3 has the highest high.

    #234177

    Hi!
    Here you have something to start working your own code:

    #234197

    Thanks Iván,

    I will test the code and adjust if needed.

    I’ll let you know the results.

    BR,

    Richard

     

     

    #234747

    Hi Iván,

    I have tested and the result is ok but it gives not yet the result I wanted.

    Attached a screenshot of the result of the code and below my remarks:

    • The numbers doesn’t need to be visible
    • Only the yellow ‘square’ need to be visible, so I know when the indicator starts counting
    • Only a highest candle need to be highlighted,  for example with an arrow or an other figure.
    • When the highest bar of the previous range of bars (max. 6 bars) has been highlighted then the indicator need to ‘scan’ the next candles for the highest or lowest candle within a range of 2 points
    • When the reversal is a red candle, then the indicator need to check for the lowest candle within 2 points and when the reversal a green candle, the indicator need to check the highest candle.

    I don’t have the code knowledge to modify the code to process my remarks so hopefully you can help.

     

     

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

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