GetPositionProperties and GetSymbolProperties can be done much more conveniently on flags than the way it is done.
And to upgrade in a new article the codes posted in the old one is somehow.... crooked or something.
GetPositionProperties and GetSymbolProperties can be done much more conveniently on flags than the way it is done.
It's nice when you can make it even more convenient. Can we see an example?
Yes, and to upgrade in a new article the codes posted in the old one is somehow.... crooked or something.
It's hard to take into account in advance. I think, if there is a solution, which in the author's opinion complements or makes it more convenient, it is necessary to make changes warning the reader. More precisely there are two options. Either to correct in the old one or to modify in the new one. I thought that the second option is better. )) And so, the reader always has a choice.
Can I see an example?
Well, the usual flags
0x1 0x2 0x4 0x8 ..... then see availability and load what you need.

- www.mql5.com
Well, the usual flags
0x1 0x2 0x4 0x8 ..... then look at availability and load what you need.
Yeah, that's right. Didn't realise it straight away, but that would be even more convenient. I haven't quite figured out bitwise operations yet, I'll try to experiment. The Help has some difficult-to-learn material on this topic. I don't understand 100%, but I want to understand what I'm doing. )) Maybe someone will write an article on this topic.

- www.mql5.com
In order not to get an error when setting/changing trading levels, it is necessary to bring these levels to the multiple of the minimum price change(SYMBOL_TRADE_TICK_SIZE). The minimum price change does not always coincide with the point value.
Yes,
this serie of articles are great.
Nevertheless, I don't understand why when I try the EA in the strategy tester, the TP (takeprofit) and SL (StopLoss) never appears (the SL appears, but it seems that it is when I use the trailing stop only ==> the modification of the SL works, but not the first set, when the order is done)
In the sme time, when I try to debug the EA in live, the order is passed, and SL and TP are correctly set as soon as the order is send (immediatly in TradingBlock(); and it is not necessary to wait to ModifyTrailingStop();
Anyone can give an explanation ?
Is it a broker problem (Alpari UK) ?
Thanks for help.
Yes,
this serie of articles are great.
Nevertheless, I don't understand why when I try the EA in the strategy tester, the TP (takeprofit) and SL (StopLoss) never appears (the SL appears, but it seems that it is when I use the trailing stop only ==> the modification of the SL works, but not the first set, when the order is done)
In the sme time, when I try to debug the EA in live, the order is passed, and SL and TP are correctly set as soon as the order is send (immediatly in TradingBlock(); and it is not necessary to wait to ModifyTrailingStop();
Anyone can give an explanation ?
Is it a broker problem (Alpari UK) ?
Thanks for help.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
New article MQL5 Cookbook: How to Avoid Errors When Setting/Modifying Trade Levels is published:
In continuation of our work on the Expert Advisor from the previous article of the series called "MQL5 Cookbook: Analyzing Position Properties in the MetaTrader 5 Strategy Tester", we will enhance it with a whole lot of useful functions, as well as improve and optimize the existing ones. The Expert Advisor will this time have external parameters that can be optimized in the MetaTrader 5 Strategy Tester and will in some ways resemble a simple trading system.
Author: Anatoli Kazharski