((EMA(20)[0] - EMA(20)[3]) / (EMA(20)[0])) gives me a ROC of a EMA20. How do I get that value from a preceding bar? If I try to apply the 'barsAgo' to the formula I get the following error:
Cannot apply indexing with[] to an expression of type 'double'.
Creating a variable to hold the above formula gives the same error.
Can I compile a custom indicator using the formula and then reference it with a 'barsAgo'?
Comment