Market Meanness Index

generic

Active member
@Tostechnical I think the port is correct but it seems pretty useless after reading about it.

Code:
declare lower;

input length = 300;
def data = close - close[1];
def m = Median(data, 300);
def nl = fold l = 0 to length
           with x
           do x + (if GetValue(data, l) > m and GetValue(data, l) > GetValue(data, l - 1)
                   then 1
                   else 0);
def nh = fold h = 0 to length
           with y
           do y + (if GetValue(data, h) > m and GetValue(data, h) > GetValue(data, h - 1)
                   then 1
                   else 0);
plot ret = ((nl + nh)/(length - 1)) * 100;
 
T

Tostechnical

Guest
Wow thanks a lot @generic Hmmm you might be right. Looked promising at the begining but now after reading it again and testing it out it looks less good.
 

Similar threads

Top