Such a suggestion would not be useful for those that don't want that functionality.
Instead, given that this is object oriented programming, just create your own custom class, either from scratch, or by inheriting CTrade and customising it to your own liking.
Such a suggestion would not be useful for those that don't want that functionality.
Instead, given that this is object oriented programming, just create your own custom class, either from scratch, or by inheriting CTrade and customising it to your own liking.
sure one can do that, however it doesn't affect if you use it the usual way. it's just more dynamic, it would save me an extra file..
If Metaquotes were to apply your suggestion it would affect those that wish to use absolute stops and they would be forced to use relative stops, not to mention that it would break all existing EAs using the library.
So, MetaQuotes will not make such a change and it is up to you to make your own adaptations. And having an extra or embedded #include is of no consequence.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi, i have been creating a multicurrency EA, i noticed if Metatrader would include a simple line code would make this easier, from the Trade.mqh include file, code line:
bool CTrade::Buy(...)--- line code number 820bool CTrade::Sell(....)----- line code number 838
however this would mean the sl and tp not be const type.
the moment price is not passed one can enter a set stop loss and take profit in terms of pips (_Points). this would automatically set the values.
be something like