Trailing Stop on Profit EA

What steps exactly are you following to install it and at which one does it fail?
Installing process 1: I've done the overwriting files (as you've suggested before) and then compiling on MetaEditor (IDE) yet i got 11 errors, 0 warnings.

Installing process 2:
I just copy and paste whatever is in those files to the already existing files without overwriting them. So whatever was in those folders in MT5 now has whatever was in the Trailing Stop on Profit EA.

So the Experts file in MT5 now has already existing stuff + new Trailing Stop on Profit EA
the Files file in MT5 now has already existing stuff + new Trailing Stop on Profit EA
the Include file in MT5 now has already existing stuff + new Trailing Stop on Profit EA

Basically;
The contents of Experts file of Trailing Stop on Profit EA went into Experts file that already existed in MT5
contents of FIles file of Trailing Stop on Profit EA went into Files file that already existed in MT5
contents of Include file of Trailing Stop on Profit EA went into Include file that already existed in MT5.

Then compiled in MetaEditor (IDE)
(got 2 errors, 1 warning)

Hope i was clear enough explaining my processes 😀

from what i understand the .mq5 should be .ex5 when compiled, yet nothing changes 🙁 on Position Sizer EA the .ex5 file already exists so there was no need to do anything but just copy and paste files into Experts file in MQL5.

Thank you once again!!
 
Last edited:
Yes, and when I do that, in the Errors tab I get this error (attached screenshot)

At this point I am almost sure I am doing the right thing yet cannot seem to get it install 🙁
Please increase the size of the Toolbox subwindow. It is really important to see the errors, especially the first one (the one at the top).
 
@Enivid

I'm getting (assuming) the same 2 errors on the MT5 version when I compile it in MetaEditor.

identifier 'TrailingStop' already used Line 90 Column 6
')' - expression expected Line 62 Column 25

This seems to be causing the EA to NOT show up on my advisors list. Can you fix this?
Post automatically merged:

1758286312848.png
Here's an image instead
 
Last edited:
@Enivid

I'm getting (assuming) the same 2 errors on the MT5 version when I compile it in MetaEditor.

identifier 'TrailingStop' already used Line 90 Column 6
')' - expression expected Line 62 Column 25

This seems to be causing the EA to NOT show up on my advisors list. Can you fix this?
Post automatically merged:

View attachment 34467
Here's an image instead
Yes, there is a compilation problem with this EA in the latest builds of MT5. Please change line 62 from:
MQL5:
if (EnableTrailing) TrailingStop();
to:
MQL5:
if (EnableTrailing) DoTrailingStop();

And line 90 from:
MQL5:
void TrailingStop()
to:
MQL5:
void DoTrailingStop()
 
Trailing Stop on Profit has been updated to version 1.03 to incorporate the following changes:
  • Added a cTrader version of Trailing Stop on Profit.
  • Added chart corner selection for the panel.
  • Added font size selection for the panel.
  • Added automatic scaling for Hi-DPI screens.
  • Fixed a compilation error in newer builds of MT5. (@ThisIsLuisLopez)
  • Changed how autotrading status is detected and reported. The EA will now be more specific.