Code snippet to determine Currency on the Active Chart Window

 

Hello All,


I am new to writing MQL4, although i have been programming in other languages over the years, i still have a lot to learn

on this new platform.


I presently have an indicator running  that has all 28 currencies, displayed . By clicking on any of them the chart window automatically changes to the currency in the same Chart.

I have developed another indicator running on the same chart. But each time I click any of the "JPY" currencies, the results are affected. In view of this

I want to know how to  WHICH CODE STATEMENTS to use to determine the Currency that has been selected on the active chart so I can perform other operations.

Presently I have searched so hard, but found no solution.


Any help will be highly appreciated,

Regards 

Gerald

 

You "searched so hard?"

If you had gone to List of MQL4 Functions - MQL4 Reference and looked for "currency," you would have found:

Function

Action

Section

AccountCurrency

Returns currency name of the current account

Account Information

Point

Returns the point size of the current symbol in the quote currency

Checkup

and then clicked on Checkup you would have found Symbol() and _Symbol

 

Thanks William for you kind assistance.

I finally got what i was looking foe . To retrieve the current symbol in the active Chart window all i needed was to use the Symbol() function.

A friend outside this forum assisted me. But thanks for your contribution nonetheless. You are highly appreciated

Reason: