Provides functions for converting input strings 'open','high','low','close','hl2','hlc3','ohlc4','hlcc4' to corresponding source values.
Converts string to source float value
src: String to use (`close` is used if no argument is supplied).
Returns: Returns the float value of the string
return_bool(op, left_val, right_val)
Evaluates a conditional expression of 2 values given a string of the conditional operator.
op: Conditional operator string to use. (options: '>','>=','==','<=','<','!=')(default: '==')
left_val: Left value of expression. (default: float 0.0)
right_val: Right value of expression. (default: float 0.0)
Returns: Returns the boolean value of conditional expression
In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in a publication is governed by House Rules.
Copy the following line and paste it in your script.