Example: Price Increase Within Range of Candles

If you want to measure a price increase of, for example, 10%, but have the additional requirement that you want that 10% to occur within 6 candles, then you can use the script listed below.

  • Expression (A) takes the lowest value of of the past 6 candles.
  • Expression (B) simply takes the high price.
  • Then, both are compared using a formula. If (B) is divided by (A), and the result is greater than 1.10, that indicates a price increase of 10%.
FIRST EXPRESSION (A)
Minimum
Length 6
4 hours
of: Candlestick: Low price
COMPARISON OPERATOR
<>=ƒ
(b/a) > 1.10
SECOND EXPRESSION (B)
4 hours
Candlestick: High price