hello guys,
I have an EA which is made signal by text on chart, how can I send the text from the signal chart to a new one then I could auto trading on second chart.
Thank you for your reply ...
The correct option is to create an OBJ_LABEL object on the chart (which receives messages). When a signal appears, you simply change the text in this object.
- www.mql5.com
...or simply send the signal event to the other/all chart(s) using EventChartCustom ;)
The correct option is to create an OBJ_LABEL object on the chart (which receives messages). When a signal appears, you simply change the text in this object.
Unfortunate this EA has not Auto trading and it only write a text on chart as you know I can't using the another EA on the same chart and Script only works one event on start because this EA change Sell or Buy.... so I think could i send the text on the same chart and using it as auto trading...
No need to write text on the chart (using 'Comment') - someone can erase the comment on the chart. Write to OBJ_LABEL object
- www.mql5.com
You can code and load an indicator on that same chart that intercepts the message and use another EA (on another chart) to process the message and handle the trading capabilities.
But it could be A LOT easier to just code one EA that does all of it at once.
You can code and load an indicator on that same chart that intercepts the message and use another EA (on another chart) to process the message and handle the trading capabilities.
But it could be A LOT easier to just code one EA that does all of it at once.
No need to write text on the chart (using 'Comment') - someone can erase the comment on the chart. Write to OBJ_LABEL object
I'm writing this code on Script only shows comment when I dragging it on the chart.
You should specify the type of this text first.
What is it ?
Is it a Comment then use
string comment = ChartGetString(0,CHART_COMMENT);
If its a graphical text object then use the text property of the graphical object
OBJPROP_TEXT
Instead.
Once your indicator obtained the value push it up to a global terminal variable so that your other EA can read it.
- www.mql5.com
You should specify the type of this text first.
What is it ?
Is it a Comment then use
If its a graphical text object then use the text property of the graphical object
Instead.
Hi again now I could code an indicator which print EA signal, but how can I using it on another chart?
You can use the ChartID to select a chart and the ObjectName to select a object.
So you can create objects on all open charts from one EA or indicator or script by using the correct ChartID in the parameters.
https://www.mql5.com/en/docs/chart_operations/chartid
This Chart ID is usually the first parameter you specify in the object functions.
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hello guys,
I have an EA which is made signal by text on chart, how can I send the text from the signal chart to a new one then I could auto trading on second chart.
Thank you for your reply ...