Pine Script Study - High and Low

Job ID: 31252730

Budget: $30 – $250 USD

SUMMARY
Draw a high and low line based on breaking into new high and low from recent candles.

DESCRIPTION
Basic concept for determining high and low. When new high forms breaking previous high, we look to previous candles for the candle stick who's low is lower than the previous candle before it who's low is higher that the candles low.

To determine the high we wait for the current low to be broken and look back for the candle that has a high higher than a candle before it with a lower high.

Initiate study with high=0 and low equals with last weeks high on loading. After that the high and low will be calculated per bar close.

This youtube video explains the concept fully
https://www.youtube.com/watch?v=S3aKfglE1yA&feature=youtu.be


Draw High and Low lines with some input parameters NOTE:
- Candle(0) most recent, previous candle is candle(1) then candle(2) etc
HIGH
* High is based on candles highest high price compared to previous candles.
* High if Candle(1) higher than Candle(2) and previously calculated high
* High is influenced by New low. If the Current price is lower than LOW then look at previous candles for the highest high before the next candle high lower price
* High line does not move until current candle (0) closes
* Text High is printed above HIGH LINE (centre)
* Input parameters
--- High line / text colour
--- show previous high (check box)
--- previous high opaque %

LOW
* Low is based on the candle's Lowest low price compared to previous candles.
* Low if Candle(1) lower than Candle(2) and previously calculated low
* LOW is influenced by HIGH. If the Current price is Higher than HIGH then look at previous candles for the lowest Low before the next candles Low higher price
* Low line does not move until current candle (0) closes
* Text Low is printed above LOW LINE (centre)
* Input parameters
--- Low line / text colour
--- show previous Low (check box)
--- previous Low opaque %
Please see attached images showing the high and low as well as the previous high and low being shown as the candles close.

Please let me know if you have any questions
Related categories: Pine Script