v5
Added:
extract_before(symbol, pattern)
Extract the part of the string before the specified pattern
Parameters:
symbol: <simple string> Input string to search in
pattern: <simple string> Pattern to search
Returns: <simple string> Part of the string before the first occurrence of the matched pattern
extract_before_usd(symbol)
Extract the part of the string before "USD" (includes USDT, USDC, etc). This is especially useful to extract the symbol out of USD* pair ticker. Eg, out of BTCUSD, we will extract BTC.
Parameters:
symbol: <simple string> Input string to search in
Returns: <simple string> Part of the string before the first occurrence of "USD".
display_table_text(intext, tooltip)
Display some text on the last bar. Helper function to facilitate debugging or user display (eg, to confirm which symbol was detected).
Parameters:
intext: <simple string> Text to display.
tooltip: <simple string> (optional) Tooltip text to display on mouse hover.
Returns: <simple string> Nothing. Display the supplied text in a table in the top right corner. Note that this will not affect viewport scaling (ie, the viewport will still be scaled according to the content, not the text).