from ea to indicator

 

hello,

I wrote function that calculate and return (for example)variable  X(double),  how can i past with X to simple indicator that each bar displays it on separate window.

right now the same function runs on the ea, and on the indicator, but its too slow.

is there a way to make the ea  calculate X and send it to the indicator? i have looked over the forum and didn't find anything.

 thanks for the help. 

 
With EventChartCustom() function and OnChartEvent() events processing.
Reason: