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
https://www.mql5.com/ru/articles/15223
Yes, MinBLEIC used.
Thanks!
DoSomething will be called first, and only then the ~TSomeClass() destructor. Theoretically, we may not even have the TSomeClass source code on hand and not know what happens in the destructor.
However, if we do this:
, it is guaranteed that the TSomeClass destructor will be called first and only then, when the TScoupe destructor is executed, will DoSomething be called.
I don't even know how to respond to this answer.
I wasn't asking about the "advantages of wrapping in classes".
I was asking a completely different question.
Can you tell me, is this without OOP equal to the one below with OOP? And if not, what is the difference?
Functionally equivalent.
Thank you.
void OnTick() { static const bool Init = OrderSend(_Symbol, OP_BUY, 1, Ask, 0, 0, 0, 0) && OrderSend(_Symbol, OP_SELL, 1, Bid, 0, 0, 0, 0); }
Dear fxsaber, may I ask why in the construct
need static const?
Dear fxsaber, may I ask why in the design of the
need static const?
static - the variable is initialised only on the first OnTick call.
const - the variable will not be changed after initialisation. I write this way for self-control.
static - the variable is initialised only on the first OnTick call.
const - the variable will not be changed after initialisation. I write this way for self-control.
Thanks, I thought so. I just use static and const when inheriting classes, that's why I asked.
In the tester event a new bar in multisymbol trading.
Convenient. Fast.
S.W. Maybe it was already written somewhere, but I haven't seen it.Convenient. Fast.
S.W. Maybe it was already written somewhere, but I haven't seen it.the method is not working, sometimes the system shows the information of the Past on the iCustom indicators on the first tick of a new bar, i.e. there will be one value in the array on 0 and 1 closed bar - "no signal".
and also requotes will have to be processed.
in case of simple indicator spy just on M1 we process all actions and there will not be afraid of requotes and glitches of the first tick, the robot will process all M1 signals and other situations.
Also in this case you can easily control the size of the maximum spread, instead of adding, checks opened-not opened.
I.e. on the first tick you can have 3 situations for not opening a trade on the New bar.