johnw213 wrote >>
I have a script that opens up a trade in the opposite direction (EURUSD 15M), but it can't seem to detect when the price is falling or rising. Here is piece of code, is there a better way to do this? Thanks.
close <= OrderOpenPrice() - 0.0060
if (OpenTakeProfit()>0) price is rising if you are buying
Thanks.....Can you use this method to detect if the price has fallen to a certain point, like for example, -5.00?
Actually, the command I think you're trying to convey is OrderProfit():
https://docs.mql4.com/trading/OrderProfit
Either way, whether you use that command or the OrderOpenPrice() command you will have to select the order first - not sure if you were aware of that.
- Tovan
Thanks guys. It worked!
![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
I have a script that opens up a trade in the opposite direction (EURUSD 15M), but it can't seem to detect when the price is falling or rising. Here is piece of code, is there a better way to do this? Thanks.
close <= OrderOpenPrice() - 0.0060