Analysis Functions
Candle analysis usage guide found at Analysis guide.
Pattern | API | Description |
---|---|---|
Above | above | Above Analysis Checks whether the indicator reading is higher than the indicator_cmp reading. By default, it evaluates the latest candle but can also check n candles back. If any candle within the specified range is above, it returns True . |
Below | below | Below Analysis Checks whether the indicator reading is lower than the indicator_cmp reading. By default, it evaluates the latest candle but can also check n candles back. If any candle within the specified range is below, it returns True . |
Value Range | value_range | Value Range Analysis Calculates the difference between the minimum and maximum values for the given indicator within a specified range of candles. Includes the latest candle by default. If the specified length exceeds the available candles, it will evaluate all candles. |
Rising | rising | Rising Analysis Determines whether the indicator consistently rises across a specified range of candles. By default, it checks if the current indicator value is greater than the previous one. |
Falling | falling | Falling Analysis Determines whether the indicator consistently falling across a specified range of candles. By default, it checks if the current indicator value is lower than the previous one. |
Mean Rising | mean_rising | Mean Rising Analysis Evaluates whether the indicator is, on average, rising across a specified range of candles. By default, it checks if the current indicator value is higher than the average of the previous four readings. |
Mean Falling | mean_falling | Mean Falling Analysis Evaluates whether the indicator is, on average, falling across a specified range of candles. By default, it checks if the current indicator value is lower than the average of the previous four readings. |
Highest Reading | highest | Highest Reading Analysis Determines the highest value of the specified indicator over a given number of candles. By default, includes the latest candle and evaluates up to the previous four candles. |
Lowest Reading | lowest | Lowest Reading Analysis Determines the lowest value of the specified indicator over a given number of candles. By default, includes the latest candle and evaluates up to the previous four candles. |
Highest Bar Offset | highestbar | Highest Bar Offset Analysis Determines the offset (distance) to the candle with the highest reading of the specified indicator within a given range. By default, includes the latest candle and evaluates up to the previous four candles. |
Lowest Bar Offset | lowestbar | Lowest Bar Offset Analysis Determines the offset (distance) to the candle with the lowest reading of the specified indicator within a given range. By default, includes the latest candle and evaluates up to the previous four candles. |
Cross | cross | Cross Analysis Determines whether the indicator reading has crossed the indicator_cmp reading within a specified range of candles. The cross can occur in either direction. |
Crossover | crossover | Crossover Analysis Determines whether the indicator reading has crossed over the indicator_cmp reading within a specified range of candles. A crossover occurs when indicator transitions from below to above indicator_cmp within the given range. |
Crossunder | crossunder | Crossunder Analysis Determines whether the indicator reading has crossed under the indicator_cmp reading within a specified range of candles. A crossunder occurs when indicator transitions from above to below indicator_cmp within the given range. |
Flipped Reading | flipped | Flipped Reading Analysis Determines whether the indicator has "flipped" its value, meaning the current reading is different from its previous reading, and within the last length candles, the indicator was above its previous reading. |