'How to tell a function its specific source timeframe in code? Pine Script V5
The story is, for example, that I want get to the 200-hours EMA for using it in math, for obvious basic reasons. That's practically the 50-pip/4h or 800-pip/15min EMA.
In the built-in EMA Indicator, we can select the source timeframe but the question is: how to simply tell the ta.ema(source,length) function in code to get the data from a specific timeframe?
Only this function, not any other in the code. (All the other expressions, functions in the indicator must work with the current timeframe.) The source code of the built-in EMA indicator doesn't give a clue or it sticks out my eyes.
Solution 1:[1]
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 | vitruvius |

