Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1049

 
Никитос:

Hi all. Please tell me what the hell is going on.

I'm writing code in mql5, I want to use the PositionClose function, but it says "Man! PositionClose' - the function can be declared only in the global scope".

I was like, I mean this same function is in #include <Trade\Trade.mqh> by default.


Checked. It's there.

Why is it showing off, what does it need, how to close the position?


The code itself


Rename your function.

 

Can you please tell me how to write a set-file after optimization in MT5, in order to load it into an EA later on?

THANK YOU.

 
What value does iTickVolume(NULL, 0,0) return when a new bar appears?
 
Alexander Fedosov:
What value does iTickVolume(NULL, 0,0) return when a new bar appears?

1

This is if the ticks didn't come in batches.
 
Alexey Viktorov:

1

This is if the ticks are not in a batch.
Is a batch of ticks from more than one event? Price, volume...
How then do I know the tick volume from the price change event?
 
Alexander Fedosov:
Is a batch of ticks from more than one event? Price, volume...
How do I know the tick volume from a price change event?

A new bar doesn't start until there is a tick during that new bar. Batch is a bit of a mouthful. I did not observe that, but I read that the determination of a new bar by volume is not reliable precisely because more than one tick may occur at once.

 

Help clarify a couple of questions about CTRADE:


1. Why is it necessary to specify a price in PositionOpen, since it is essentially a market order. What will happen if the price specified there is several pips different from the current price, i.e. in fact is non-market? So far, the only explanation I have found is that it is used to calculate the deviation and compare it with the value specified in SetDeviationInPoints.

Is it true?

Does SetDeviationInPoints limit the slippage in both directions or only in the negative direction? For some reason, I can specify the deviation in PositionClose but cannot do it in PositionOpen .

 

Hello all.

There is a problem with the Print(); function in mt5.

                  
                  Print("Але Где Текст");
                  Print("1");
                  Print("2");
                  Print("3");
                  Print("4");
                  Print("5");
                  Print("6");
                  Print("7");
                  Print("8");

And supposedly the digits should appear in the Logs in order. Attention in the Logs, not in the logs.

This is the kind of crap I'm seeing in the logs.

RE      0       21:27:29.430    Core 1  2019.02.14 11:09:42   6
QL      0       21:27:35.537    Core 1  2019.02.14 11:09:57   4
IJ      0       21:27:41.655    Core 1  2019.02.14 11:24:40   5
EP      0       21:27:47.763    Core 1  2019.02.14 11:34:57   8
MN      0       21:27:53.868    Core 1  2019.02.14 11:44:31   2
EE      0       21:27:59.973    Core 1  2019.02.14 11:54:36   1
NS      0       21:28:06.089    Core 1  2019.02.14 12:04:46   4
JI      0       21:28:12.198    Core 1  2019.02.14 12:14:51   7
NG      0       21:28:18.324    Core 1  2019.02.14 12:54:40   4
JN      0       21:28:24.431    Core 1  2019.02.14 13:19:48   8
KD      0       21:28:30.535    Core 1  2019.02.14 13:34:37   4
KR      0       21:28:36.647    Core 1  2019.02.14 13:49:45   7
KH      0       21:28:42.752    Core 1  2019.02.14 13:59:44   5
PG      0       21:28:48.864    Core 1  2019.02.14 14:04:55   3
EM      0       21:28:54.969    Core 1  2019.02.14 14:09:46   6
DK      0       21:29:01.072    Core 1  2019.02.14 14:14:44   5
MQ      0       21:29:07.214    Core 1  2019.02.14 14:39:43   6
IH      0       21:29:13.318    Core 1  2019.02.14 15:29:38   2
QF      0       21:29:19.421    Core 1  2019.02.14 15:49:56   7
JL      0       21:29:25.542    Core 1  2019.02.14 16:14:51   5
LJ      0       21:29:31.648    Core 1  2019.02.14 16:19:59   6
NQ      0       21:29:37.751    Core 1  2019.02.14 16:39:48   5
KO      0       21:29:43.861    Core 1  2019.02.14 16:39:57   3
PE      0       21:29:49.967    Core 1  2019.02.14 16:44:38   4


Numbers are random. Not in order.

What is the error and how to fix it.


Once again, this is a screenshot from the logs, not the Tester\Logs

 
Никитос:

Hello all.

There is a problem with Print(); function displaying in mt5.

And supposedly the digits should appear in the Logs in order. Attention in the Logs, not in the logs.

This is the kind of crap I'm seeing in the logs.


Numbers are random. Not in order.

What is the error, how to fix it.


Once again, this is a screenshot from the logs, not the Tester\Logs

If you try to type on every tick, terminal simply bans you as a spammer - automatically protects itself and does not show all comments.

 
Tell me, I installed the mobile application mcl5 when entering requires a username and password and I tried the password and login to mcl5, I tried the password and login from the account, it does not work how to do?
Reason: