'Pine Editor, If chart 1 then Chart 2

I've been trying to write a code that tracks a chart (chart1) and implements indicators on another chart (chart2), basically there is a correlation between them.

The code I am trying to write is that if chart 1 price crosses the Moving Average then give indicator to chart 2.

Can anybody confirm if this is doable?

thank you



Sources

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

Source: Stack Overflow

Solution Source