What is the most efficient way to disable a custom study while the interval is set to anything other than "D" or "W"? For example, I need to display EMA50, SMA50 and SMA200 on advanced charts only when the interval is set to "D" or "W". Because I frequently switch between daily and intraday charts, I don't want to waste CPU time to calculate them while watching intraday charts. Since I'd like to use the builtin MAStudy in the code, what is the efficient way to disable MAStudy when the interval is less than "D"? Or where can I find an efficient implement of EMA and SMA so that I can modify them a little bit so that it can behave as I want? Thanks.
Clearpicks
Clearpicks
Comment