I am currently building my first pine scripts and want to have the following check
check5 = (macd(close,12,26,9) > highest (macd(close,12,26,9), 40))
--> i.e. I want to check if the macd of today is larger than the highest macd over the last 40 days ...
Unfortunately I get this error: Cannot call 'highest' with arguments ([series[float], series[float], series[float]], literal integer); available overloads: highest(series[float], integer) => series[float]; highest(series[float], series[integer]) => series[float]; highest(integer) => series[float]; highest(series[integer]) => series[float];
I have googled for a couple of hours but cannot find a solution to my problem... would strongly appreciate if someone could help?