![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
DomGilberto: C) Not sure what difference this makes?
One area I am struggling with is how I check every single tick ONCE the OP_BUYSTOP has been triggered into an OP_BUY. I am for the time being going to continue with slapping one trade in and doing partial closes - purely on the basis that I am confident I have nearly done it?
I've really appreciated the contribution on this thread - it's massively helped me understand a lot :) so thanks again for your time!!
Ok - I am getting pretty close to getting this grounded (just been writing down things I need to fix / how / and logic applied)
One area I am struggling with is how I check every single tick ONCE the OP_BUYSTOP has been triggered into an OP_BUY.
You can't, you have to check every tick to see if the OP_BUYSTOP has triggered to an OP_BUY . . . but what you can do is check if you have any OP_BUYs, if you don't then you can simply return(0); and avoid the rest of the code.
Does that help ?
Lets say my "OP_BUYSTOP" has triggered into a "OP_BUY", can I then check every tick so that my OrderClose() function will close at my desired price AS SOON as the bid is == to the exit price specified?
Lets say my "OP_BUYSTOP" has triggered into a "OP_BUY", can I then check every tick so that my OrderClose() function will close at my desired price AS SOON as the bid is == to the exit price specified?
I don't know how to do that. Can you point me in the right direction?
Ah, yup I got you - my mistake. Read what you wrote wrong.
I don't know how to do that. Can you point me in the right direction?
Sorry, what I meant was, is there an in-built function within MQL4 that I need to use, in order to check every tick?