
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
I have a question.
How do you send buy stop limit or sell stop limit orders with the inbuilt classes if you are creating your own module? Cannot find provision for stoplimit price
How do you send buy stop limit or sell stop limit orders with the inbuilt classes if you are creating your own module? Cannot find provision for stoplimit price
The order type (limit or stop) depends on price.
For example, to trade using buy stop orders you must specify the price, higher than current ask price.
The buy case (in CheckOpenLong):
For the case of the price inside the freeze level it will use the market price.
See example in MQL5 Wizard - Trade Signals Based on Crossover of Two EMA with intraday time filter
The order type (limit or stop) depends on price.
For example, to trade using buy stop orders you must specify the price, higher than current ask price.
The buy case (in CheckOpenLong):
For the case of the price inside the freeze level it will use the market price.
See example in MQL5 Wizard - Trade Signals Based on Crossover of Two EMA with intraday time filter
Hey I actually wrote buy_stop_limit and sell_stop_limit orders. Now yes you are right the price variable for each of these will be above Ask plus maximum of freeze and stops & below bid minus maximum of the same respectively. My question is how do we set the stoplimit price?
Ok, now I see. The Buy Stop Limit and Sell Stop Limit orders are not used by CExpert (such orders may be useful for non-liquid stocks), so you need to write your own implementation.
Non liquid stocks?... just testing EURUSD over a decade with stop limit orders and this strategy clearly outperforms the limit order option. Any way I hope metaquotes can provide an implementation to go with this not too bad library.
Thanks for the feedback
Why do I need the main class CExpertSignal? Let's say I put a collection of indicators into it, but what algorithm will it use to make a decision on opening a deal? If its descendants do everything, why make them (descendants) its descendants? Why can't they be made as base classes?
Interesting:
Ознакомтесь плиз с основами ООП, я бы даже сказал С БАЗОВЫМИ ОСНОВАМИ...
In this particular case, inheritance is probably necessary only because the InitSignal method of the CExpert class understands only an object of type CExpertSignal or its descendant? And virtual methods in CExpertSignal are necessary for CExpert to correctly access methods of its descendant? The parent is just a template to build your class on. Am I right?
Более подробно класс CExpert и работа с ним будут рассмотрены в отдельной статье.
A separate article with details about the CExpert class and how to work with it hasn't appeared yet?
Is this article still relevant? I tried generating an Expert Advisor with the file attached here, it does not trade.