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

Not able to use MtApi EA with investor password #223

Closed
eabase opened this issue Nov 3, 2020 · 4 comments
Closed

Not able to use MtApi EA with investor password #223

eabase opened this issue Nov 3, 2020 · 4 comments

Comments

@eabase
Copy link
Contributor

eabase commented Nov 3, 2020

Problem:

The EA get unhappy if you use a non-tradable account for MT login credentials.
This presumably prevent further use of the EA & API.

Expected
We should be able to do all normal operations , apart opening a trade, even when using investor credentials. :)

@eabase
Copy link
Contributor Author

eabase commented Nov 23, 2020

@vdemydiuk
Is there a way you can modify the EA to allow using it also with an investor password?

@eabase
Copy link
Contributor Author

eabase commented Nov 26, 2020

This is probably related to #78.

@eabase
Copy link
Contributor Author

eabase commented Nov 27, 2020

Easy fix:

    if (IsTradeAllowed() == FALSE) {
        MessageBox("Trading is Disabled.", "MT4 API EA", MB_OK);
        //isCrashed = TRUE;
        //return (1);
    }

@vdemydiuk
Copy link
Owner

@eabase Yes, you are right.
This checking prevents using MtApi with non-tradable accounts. It was added on the begining of the project and it is not actual for now.
I will remove code that stops experts if trade is not allowed (for both versions, MT4 and MT5).
User always can check this mode in runtime by calling function:
IsTradeAllowed() - MT4
TerminalInfoInteger(property TERMINAL_TRADE_ALLOWED) - MT5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
MtApi MT4
Awaiting triage
Development

No branches or pull requests

2 participants