Is it possible to Comment on other charts in multi currency EA?

 

Hi friends,

For example my EA trades 4 different pairs by just putting it on EURUSD. I know how to use Comment for current chart, but in my case is it possible to use Comment function for 3 other charts?

As always, your advice is greatly appreciated!

 
HosseinKOGO:

Hi friends,

For example my EA trades 4 different pairs by just putting it on EURUSD. I know how to use Comment for current chart, but in my case is it possible to use Comment function for 3 other charts?

As always, your advice is greatly appreciated!

Use ChartSetString with the prop_id parameter set to CHART_COMMENT

ChartSetString - Chart Operations - MQL4 Reference
ChartSetString - Chart Operations - MQL4 Reference
  • docs.mql4.com
ChartSetString - Chart Operations - MQL4 Reference
 
  1. You are running on one chart, so ChartSetString is irrelevant.
  2. You can use Comment, just separate lines with “\n”.
  3. You can also stop using Comment and use multiple labels.
 
William Roeder #:
  1. You are running on one chart, so ChartSetString is irrelevant.
  2. You can use Comment, just separate lines with “\n”.
  3. You can also stop using Comment and use multiple labels.

He's trying to comment on other charts.

but in my case is it possible to use Comment function for 3 other charts?

Edit: I see what you're saying, though. It could be best to comment on the same chart depending on the OP's goal. A simple prepend of the instrument symbol along with the comment, with each comment separated by the newline character, might suffice.

OP, it could look like this on the main chart:

EURUSD: Some comment
GBPUSD: Another comment
USDJPY: Yet another comment
AUDUSD: Last comment

 

The Label idea does the trick for me(since I have many pairs rather than only 4).

Many thanks friends!