Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1423
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Please advise an example of using this function in EA.
You can look here.
Hello!
https://www.mql5.com/ru/search#!keyword=ACCOUNT_LOGIN&module=mql5_module_forum
Hello!
You forgot the parentheses in the if. If not equal to the score, then comment and then retourn. And if it is not equal to the score, it goes on and hits retourn.
And after that OnTick finishes and waits for the next tick. It doesn't go any further!!!!
Thanks !!! Got it all figured out, fixed it and it works now.
It was just a glitch that went to my head.
Can you tell me if it is possible to make a call from the Expert Advisor
void OnTradeTransaction()
from an external file ?
I created a test file *mqh and added it there.
In the Expert Advisor I added this file
#include <тест.mqh>
But OnTradeTransaction is not called from the Expert Advisor.
How to do it correctly ?
How to do it correctly ?
I would do the opposite. In the .mqh file write a class, for example CTest in the file test.mqh.
Connecting the class
#include <test.mqh> CTest onTest;
And from the EA from the OnTradeTransaction function call my function
I would do the opposite. In the .mqh file I would write a class, for example CTest in the file test.mqh.
Connecting the class
And from the EA from the OnTradeTransaction function call my function
I have dared to try a first simple EA and it works flawlessly.
But when I upload it to MQL in the market, I get an error message:
Why is that? Is it due to the netting account?
I have already read some forum posts about this, but I don't understand the problem.
The volume is fixed by the EA. Even 0.01 lot etc. does not work.
Would be grateful for someone to help me out.
Why is that? Is it due to the netting account?
I have already read some forum posts about this, but I don't understand the problem.
The volume is fixed by the EA. Even 0.01 lot etc. does not work.
Would be grateful for someone to help me out.
It's because of how you calculate the volume (lots) - but without code?
Fixed lot size is probably not a solution, I guess you check with high and low account balance and different margin charges...