I agree, trade classes have stabilised enough now. So why, while advocating their use, the examples include functions for obtaining instrument properties instead of using methods of CSymbolInfo class. It seems inconsistent.
Clarify what you mean. If you call to write classes everywhere, some newcomers may find it complicated and incomprehensible.
Rosh: Clarify what is meant. If you call to write classes everywhere, some newcomers may find it complicated and incomprehensible.
Actually, it's not me who urges you to use'Standard Library' classes in the above quote, I only agree. Of course, it's a matter of taste.
In a little bit complex EA there are a lot of references to symbol properties and by creating once an instance of CSymbolInfo class we simplify the references to them and the perception of the programme. My opinion.
When using BuyStop function in the code to trade RTS-3.13 (RIH3) futures, an error keeps occurring :
10022 TRADE_RETCODE_INVALID_EXPIRATION - Invalid order expiry date
In the specification of futures RTS-3.13 it is specified that the type of orders - Valid until cancellation. in the queue until cancelled.
I tried to use other types ORDER_TIME_DAY, ORDER_TIME_SPECIFIED, ORDER_TIME_SPECIFIED_DAY - the error does not disappear.
Part of the code:
In the Strategy Tester log of the entry :
What could be the problem ? Please give me a hint. I will be grateful if you reply to mail nfo52^mail.ru, ICQ UIN: 4002787, skype: osipov52.
Thank you.
Win7 64 razr., MT5 , Demo-account DB Discovery.
Similar problem on RTS-3.13 Otkritie-demo, tried everything (while limit orders are set to ORDER_TIME_SPECIFIED_DAY as written in the symbol profile) !!!!. While buy-stop order is perfectly open in the market manually. This is a terminal glitch, you should write to the developers
Yeah, it couldn't be simpler! They have wised up a lot of things there, and yet using standard libraries, and if without them, so to speak, from scratch???? The easiest and fastest way to programme an Expert Advisor on MQl4!!!! My EA on mql4 takes 70 lines, I rewrote it on mql5, and it turned out to be 198!!!!!!. So the title with the word "simple" is not appropriate.
В статье рассказывается о том, как использовать основной функционал торговых классов Стандартной библиотеки при написании советников, в которых применяется открытие, закрытие и модификация позиции, проверка свободной маржи перед размещением торговых ордеров, размещение и удаление отложенных ордеров. Показано, как использовать торговые классы для получения свойств ордеров и сделок.
zlodei: ...My mql4 EA takes 70 lines, I rewrote it to mql5, and it turned out to be 198!!!!!! So the title with the word "simple" is not appropriate.
This is if the EA idea is not complicated. Imho, the more complex the idea, the more the difference in the number of code lines between MQL4 and MQL5 will be in favour of the latter. So I wouldn't be so categorical....
You should still review the code before publishing.
I agree, trade classes have stabilised enough now. So why, while advocating their use, the examples include functions for obtaining instrument properties instead of using methods of CSymbolInfo class. It seems inconsistent.
This has been fixed a long time ago, back on the day of publication.
Clarify what is meant. If you call to write classes everywhere, some newcomers may find it complicated and incomprehensible.
Actually, it's not me who urges you to use'Standard Library' classes in the above quote, I only agree. Of course, it's a matter of taste.
In a little bit complex EA there are a lot of references to symbol properties and by creating once an instance of CSymbolInfo class we simplify the references to them and the perception of the programme. My opinion.
I apologise, I didn't know where to ask this question and decided to ask it here, I think the topic is suitable.
How can I close all orders opened either only for selling or only for buying at once?
I apologise, I didn't know where to ask this question and decided to ask it here, I think the topic is suitable.
How can I close all orders opened either for selling or for buying at once?
Part of the code:
In the Strategy Tester log of the entry :
What could be the problem ? Please give me a hint.
I will be grateful if you reply to mail nfo52^mail.ru, ICQ UIN: 4002787, skype: osipov52.
Thank you.
Win7 64 times, MT5, demo-account DB Otkrytie.
Part of the code:
In the Strategy Tester log of the entry :
What could be the problem ? Please give me a hint.
I will be grateful if you reply to mail nfo52^mail.ru, ICQ UIN: 4002787, skype: osipov52.
Thank you.
Win7 64 razr., MT5 , Demo-account DB Discovery.
...My mql4 EA takes 70 lines, I rewrote it to mql5, and it turned out to be 198!!!!!! So the title with the word "simple" is not appropriate.