Hi everyone, I have a question that has been bothering me for a long time, and I couldn't find a solution in the answer library. I would like to obtain the corresponding stock price when a specific technical indicator is at its highest point, for example:
period = 25;
highestValue = HHV(MACD(r1, r2), period); // Indicator highestValue
pp = ValueWhen(highestValue,C); //price position
I can only obtain the closing price for the last day “lastvalue(c)”, not the corresponding price within the indicator.
Thank you very much!
Thank you very much for your help. I tested this method using a watchlist. I found that some are correct, while others are not. I am working hard to understand why. However, I don't have a programming background (I am an automotive chassis engineer and CAE simulation engineer), but I will do my best to understand the solution you mentioned.