This ProBuilder code snippet demonstrates how to use conditional logic to manipulate data and create a custom screener output based on multiple trading indicators. The example focuses on RSI values and price extremes over a specified period.
// Result hh ll
// 9 9 (no match)
// 1 9
// 9 1
// 1 1
MyRsi = Rsi[14](close)
c1 = MyRsi < 30
hh = (high = highest[20](high))
ll = (low = lowest[20](low))
x = 90
IF hh THEN
x = 10
ENDIF
IF ll THEN
x = x + 1
ELSE
x = x + 9
ENDIF
IF x = 99 THEN
x = 0
ENDIF
Result = x
IF c1 = 0 THEN
Result = 0
ENDIF
SCREENER[Result](Result AS "HL")
This code snippet is structured to evaluate certain conditions and adjust a variable accordingly, which is then used to filter results in a screener. Here's a breakdown of its functionality:
This example is useful for understanding how to combine multiple conditions and outputs in a screener using ProBuilder's programming capabilities.
Check out this related content for more information:
https://www.prorealcode.com/topic/multiple-column-screener-results-display/#post-104130
Visit Link