Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling of £ in the symbol name #13

Open
Sebster7 opened this issue Jan 30, 2025 · 11 comments
Open

Handling of £ in the symbol name #13

Sebster7 opened this issue Jan 30, 2025 · 11 comments

Comments

@Sebster7
Copy link

Hi, I've been trying to get the Account Protector EA to work without success and I have noticed that it says

EURUSD.? Account Protector (ver. 1.121)

in the title bar and it occurred to me that maybe the problem is that the EA does not handle symbols with £ in them correctly, not just for the display of the title, but also in other places, e.g. the Filters, which causes the actions to not actually happen. Do you think this could be the issue?
The symbol in this case is actually EURUSD.£
I don't see anything in the Experts tab apart from it being initialized or uninit.

@EarnForex
Copy link
Owner

It would help to see how you set it up. Could you add some screenshots of what conditions/actions you set and of what happens when they should get triggered?

@Sebster7
Copy link
Author

Sebster7 commented Feb 3, 2025

It would help to see how you set it up. Could you add some screenshots of what conditions/actions you set and of what happens when they should get triggered?

Sure!

Image

Image

Image

Image

I get other MT4 alerts from EAs and fromtrades from this terminal.

@EarnForex
Copy link
Owner

So, you get to 40 points in profit on that symbol, but the AP doesn't trigger? Looks like a bug to me. Which broker offers those £-symbols so I could test this?

@Sebster7
Copy link
Author

Sebster7 commented Feb 3, 2025

OK, this is on CMC Markets, MT4 SB accounts. You might need to appear as if you are in the UK, but maybe not for a Demo account. Let me know if you need help opening an account. This link may help you: https://oaf.cmcmarkets.com/en-gb/onboarding-start?

@EarnForex
Copy link
Owner

That's weird. I've just registered a spread betting account with them, and it looks different for me. The pound symbol is replaced with the J and everything works fine:

Image

Perhaps, you are on a different server with them?

@Sebster7
Copy link
Author

Sebster7 commented Feb 4, 2025

That is weird! No, I am on the same CMC Markets server: both Demo and Live accounts of this type are on the same server. Both my Demo and Live accounts have a £ where you have the J in the symbol. Perhaps the PC that runs your MT4 does not have £ in their character set and has substituted it in MT4? Really not sure, but grasping at straws. The language on my server is actually set to English (United States) though.

Image <-- my demo account.

@EarnForex
Copy link
Owner

Got it. Once I switched my Windows' settings for non-Unicode display language to English UK, the pound symbol started appearing and I was able to reproduce this issue. Will look into it.

PS: As a temporary workaround, you can switch that setting to something else on your PC, and it will probably switch to J and will start working in the AP.

@Sebster7
Copy link
Author

Sebster7 commented Feb 4, 2025

OK, great. Thank you!

It appears that my Window's settings for displaying non-Unicode programs (system locale) are currently set to English (United States). So I'm not sure what I'd have to set it to. And I'm a little concerned it may break some things to change it now, but potentially at the weekend when the markets are closed.

@EarnForex
Copy link
Owner

For some reason, after I recompiled Account Protector.mq4, it started working even with the £ character. Could you please try that?

@Sebster7
Copy link
Author

Sebster7 commented Feb 4, 2025

Oh cool. OK, I've recompiled it on my Live account and the £ is showing up now in the title bar correctly. I copied the file over another copy in my Demo MT4 and I noted that the file size has changed as a result of the recompilation. On my Demo account, I quickly got a notification as a result of ticking the Equity >= 0 and I've got some stuff in the logs: it looks like it is working.
However, on my Live MT4:
2025.02.04 15:41:08.792 Account Protector EURUSD.£,M5: array out of range in 'Account Protector.mqh' (5129,43)
2025.02.04 15:41:08.792 Account Protector EURUSD.£,M5: CONDITION IS MET: Floating profit rose to 1 points.
And the instance of AP on my chart is no longer changing tabs when I click them.

@Sebster7
Copy link
Author

Sebster7 commented Feb 4, 2025

Would you like me to create a separate issue for this?

2025.02.04 16:41:56.664 Account Protector EURUSD.£,M15: array out of range in 'Account Protector.mqh' (5129,43)
2025.02.04 16:41:56.664 Account Protector EURUSD.£,M15: CONDITION IS MET: Floating profit rose to 1 points.
2025.02.04 16:41:31.491 Account Protector EURUSD.£,M15: initialized
2025.02.04 16:41:31.475 Account Protector EURUSD.£,M15: Deleted duplicate panel objects with prefix = 25125.
2025.02.04 16:41:31.007 Account Protector EURUSD.£,M15 inputs: ____Main=; EnableEmergencyButton=false; DoNotDisableConditions=false; DoNotDisableActions=false; DoNotDisableEquityTS=false; DoNotDisableTimer=false; ConditionDelay=0; CountFloatingInDailyPL=true; ____Conditions=; DisableFloatLossRisePerc=false; DisableFloatLossFallPerc=true; DisableFloatLossRiseCurr=false; DisableFloatLossFallCurr=true; DisableFloatLossRisePoints=false; DisableFloatLossFallPoints=true; DisableFloatProfitRisePerc=false; DisableFloatProfitFallPerc=true
2025.02.04 16:41:24.380 Expert DownloadedWithCode\Account Protector EURUSD.£,M15: loaded successfully
2025.02.04 16:41:24.334 Expert Account Protector EURUSD.£,M15: removed
2025.02.04 16:41:24.318 Account Protector EURUSD.£,M15: uninit reason 1

P.S. I had 'Ignore losing' turned on and 'Floating profit rises to points 1' as I was trying to make this trigger quickly for testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants