OK. I've been banging my head against this for too long. This code works just fine on time based charts, but not at all on tick based charts. Sometimes I can look at code and tell why... but not this time. Anyone have an idea what in this code keeps it from running on tick based charts?
It's from Mobius Zero Lag MACD for reference.
I even tried this in place of the original definition given above to no avail.
I'm sure that, as soon as I post this, it will all be clear. But for now, I'm stumped.
-mashume
It's from Mobius Zero Lag MACD for reference.
Code:
input length = 10;
input price = close;
def K = floor(2 / (length + 1));
def lag = floor((length - 1) / 2);
def ZLEMA = K * (2 * price - price[lag]) + (1 - K) * ZLEMA[1];
plot data = ZLEMA;
I even tried this in place of the original definition given above to no avail.
Code:
def ZLEMA = K * (2 * price - getValue(price, lag)) + (1 - K) * ZLEMA[1];
I'm sure that, as soon as I post this, it will all be clear. But for now, I'm stumped.
-mashume