Questions from Beginners MQL5 MT5 MetaTrader 5 - page 591
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
I don't see any problems, my Expert Advisor just works in such a way that after closing a profitable or losing trade it opens orders immediately and the ticket number in the printer is very big, so I thought it would not have to reload it manually, maybe it can be done automatically. I should thank you for this function also))
1000 orders in a year is nothing, look at the tickets on real accounts. I have, for example, last 10179697. Generally, tickets are of int type, therefore maximum value is 2 147 483 647.
And what happens if it reaches the maximum value?
I took the standard Demark Expert Advisor from the library, it seems to work. I started to refine it.
double DU = iCustom(NULL, 0, "itdlines", Level, 0, 0);
double DD = iCustom(NULL, 0, "itdlines", Level, 1, 0);
double DU1 = iCustom(NULL, 0, "itdlines", Level, 0, 1);
double DD1 = iCustom(NULL, 0, "itdlines", Level, 1, 1);
I added calculations and additional output data to this indicator and it works out as follows
double DU = iCustom(NULL, 0, "itdlines", Level, 0, 0);
double DD = iCustom(NULL, 0, "itdlines", Level, 1, 0);
double DU1 = iCustom(NULL, 0, "itdlines", Level, 0, 1);
double DD1 = iCustom(NULL, 0, "itdlines", Level, 1, 1);
double LUN = iCustom(NULL, 0, "itdlines", Level, 2, 0);
double LDN = iCustom(NULL, 0, "itdlines", Level, 3, 0);
double KUN = iCustom(NULL, 0, "itdlines", Level, 4, 0);
double KDN = iCustom(NULL, 0, "itdlines", Level, 5, 0);
and it starts to lag, i.e. i get errors of invalid data.
The question is if I have created the same indicator 8 times and got the right array from it, or am I wrong? Or am I wrong, an indicator is created once?
If I'm right, how can I create it once and get the required data from it?
Hello colleagues!
Please advise on the structure of a trade request to close a position in MT5 with a hedge.
Thank you.
Hello colleagues!
Please advise on the structure of a trade request to close a position in MT5 with a hedge.
Thank you.
You can use method from standard library of CTrade class
I took the standard EA for the demark from the library, it seems to work. I started to refine it.
double DU = iCustom(NULL, 0, "itdlines", Level, 0, 0);
double DD = iCustom(NULL, 0, "itdlines", Level, 1, 0);
double DU1 = iCustom(NULL, 0, "itdlines", Level, 0, 1);
double DD1 = iCustom(NULL, 0, "itdlines", Level, 1, 1);
I added calculations and additional output data to this indicator and it works out as follows
double DU = iCustom(NULL, 0, "itdlines", Level, 0, 0);
double DD = iCustom(NULL, 0, "itdlines", Level, 1, 0);
double DU1 = iCustom(NULL, 0, "itdlines", Level, 0, 1);
double DD1 = iCustom(NULL, 0, "itdlines", Level, 1, 1);
double LUN = iCustom(NULL, 0, "itdlines", Level, 2, 0);
double LDN = iCustom(NULL, 0, "itdlines", Level, 3, 0);
double KUN = iCustom(NULL, 0, "itdlines", Level, 4, 0);
double KDN = iCustom(NULL, 0, "itdlines", Level, 5, 0);
and it starts to lag, i.e. i get errors of invalid data.
The question is if I have created the same indicator 8 times and got the right array from it, or am I wrong? Or am I wrong, an indicator is created once?
If I'm right, how can I create it once and get the required data from it?