Create object on multiply charts

 

Hi,


Let`s assume I have 4 charts open on my screen, with different pairs ( EURUSD, USD JPY etc). My EA checks periodically the charts/pairs if conditions for trade setups are OK. I would draw an arrow on a chart where setup is possible, to point on the possible setup time, above the particular candle . ( it works also automatically).  How can I set in ObjectCreate, what pair  window the arrow should be placed? Should I use WindowHandle() function, to identify the chart window?

Please advice

Thanks

F.

 
paf01200:

Hi,


Let`s assume I have 4 charts open on my screen, with different pairs ( EURUSD, USD JPY etc). My EA checks periodically the charts/pairs if conditions for trade setups are OK. I would draw an arrow on a chart where setup is possible, to point on the possible setup time, above the particular candle . ( it works also automatically).  How can I set in ObjectCreate, what pair  window the arrow should be placed? Should I use WindowHandle() function, to identify the chart window?

Please advice

Thanks

F.



make _separate_window (s) different pair showing price other pairs (Line Chart) and put there your Object if conditions for trade setups are OK
 
paf01200:

Let`s assume I have 4 charts open on my screen, with different pairs ( EURUSD, USD JPY etc). My EA checks periodically the charts/pairs if conditions for trade setups are OK. I would draw an arrow on a chart where setup is possible, to point on the possible setup time, above the particular candle . ( it works also automatically).  How can I set in ObjectCreate, what pair  window the arrow should be placed? Should I use WindowHandle() function, to identify the chart window?

ObjectCreate doesn't use a window handle, so no, you can't draw on other charts.

No need to anyway. The EA should just check for setups on its OWN chart and draw on its OWN chart and trade its OWN pair. Then you put the EA on the OTHER charts. No code needed.