EA Move sl to 10 pips profit

 
I am trying to implement a function in a EA, after price moves 100 pips in your favor, Move SL to 10 pips after Entry poinT, so stop loss can stay in profit and also use tralling stop to stay in profit. Somebody have an idea of how to implement it?
 
Otavio Barreto: I am trying to implement a function in a EA, after price moves 100 pips in your favor, Move SL to 10 pips after Entry poinT, so stop loss can stay in profit and also use tralling stop to stay in profit. Somebody have an idea of how to implement it?

Since you do not seem to know how to code yet, I suggest that you search the CodeBase for something similar to what you want.

Then you study the code, and make very small changes until you learn how the code works and how you can change it properly.

As you do this, you reference the documentation so that you fully understand the functionality. You can also ask specific questions about the code here in the forum.

Step by step, you modify it until it does what you want.

 
Fernando Carreiro #:

Since you do not seem to know how to code yet, I suggest that you search the CodeBase for something similar to what you want.

Then you study the code, and make very small changes until you learn how the code works and how you can change it properly.

As you do this, you reference the documentation so that you fully understand the functionality. You can also ask specific questions about the code here in the forum.

Step by step, you modify it until it does what you want.

Sorry But I could not find it, there is no tralling stops on documentation.

 
Otavio Barreto #:

Sorry But I could not find it, there is no tralling stops on documentation.

Almost all EAs on CodeBase MT4 and MT5 have a trailing stop function.

You have to open the EA code then you will be able to see the trailing stop function

 
Otavio Barreto #:Sorry But I could not find it, there is no tralling stops on documentation.

Correct! You have to program it yourself. That is why I said for you to study the many examples in the CodeBase.

MQL5 Code Base
MQL5 Code Base
  • www.mql5.com
MQL5 Source Code Library for MetaTrader 5