'I want to catch this moment and work on it even if it happens again in the future (CA)

em20 = ta.ema(close, 20)
em50 = ta.ema(close, 50)

Signal = ta.crossover(em20, em50)

CA = ta.valuewhen(Signal, close, 0)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source