Newbie to MQL5 programming.
Trying to learn by upgrading existing Expert in MT5.
Looking at the ExpertMAPSAR I want to add two functions:
1. A set stop-loss when the trade is entered.
As it is now there is a trailing parabolic stop-loss that only kicks in after the trade is in positive territory. I want to add a fixed stop-loss that is valid until the trailing stop-loss starts.
2. A timed stop-loss,
I.e. after a certain time I want the position to be automatically closed unless in positve.
Thank you very much in advance for your help.
If you are trying to learn mql5, you began to wrong way. ExpertMAPSAR is an example Expert built with MQL5 Wizard, it's easy to use without programming, but it's use advanced techniques, like OOP and if you have to change it manually, it's really not for a beginner. Anyway to answer your question, what you can do is to build a new EA, with the Wizard and then choose the needed options.
If your goal is to learn mql5, I suggest you to start with more standard EA lile Moving Average or MAD Sample.