cuneytates:
Hi friends,
I saw Mr Raimund Bauer's youtube video which he use moving average as a stoploss.
I tried to use 29 and 30 period moving average as a stoploss. Buy is working but Sell is not.
While searched to forum and see Mr. Watfords post at https://www.mql5.com/en/forum/146076 but still doesnt understand OrderModify Error 1 etc.
Any eyes which saw my mistake?
his code only opens a BUY order and waits for this order until it is Stop forever. It is never updated after the first opening of the 30 EMA. It never reaches the SELL Order.
Write a separate function that tracks Stops after order openings are made.
Do not keep the last stop at the EA, it will reset at this value when the EA is restarted.
![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
Hi friends,
I saw Mr Raimund Bauer's youtube video which he use moving average as a stoploss.
I tried to use 29 and 30 period moving average as a stoploss. Buy is working but Sell is not.
While searched to forum and see Mr. Watfords post at https://www.mql5.com/en/forum/146076 but still doesnt understand OrderModify Error 1 etc.
Any eyes which saw my mistake?