'How can I access Indicator data?
I wish to access data from an indicator in pine script. In mt4 I can use the function to do this. is there a similar function call in pine script "iCustom".
Solution 1:[1]
There isn't really a direct equivalent. There are four ways you might accomplish it though.
- There exists some built in functions for common indicators that can be referenced under the
ta.namespace such asta.rsi() - Obtaining a series from another indicator applied to the chart. Your script must use only one
input.source()and then it can use one output from another indicator that is applied to the chart as a source series which you can use in your script's calculation. It has to be set manually once both indicators are on your chart by changing your script'sinput.source()option to use the other indicator's output. - Create or use a library which performs the desired calculations and reference that from your script.
- Directly include the code to perform the other indicator's calculation in your script.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | rumpypumpydumpy |
