Experts: Virtual Trailing Stop - page 6

 
Vladimir Karputov:
Perhaps a modified version will suit you: Virtual Trailing Stop 2

Thank you very much Vladimir.

I don´t know why I am having such a hard time understanding a simple concept like a trailing step, it is like it made a knot in my brain lol...

Can you just confirm that my thinking is correct here?

If I set a trailing stop with a length value of 20 pips after price reached the minimum profit to start the trailing stop, for every pip the price moves in my direction the trailing stop will go up too 1 pip, right? Preserving the 20 pip distance between price and stop. This is how a simple trailing stop with no step parameter would work.

Does it mean that a simple trailing stop adjusting at every 1 pip equals a trailing step of 1?

The step parameter just adds extra space between the trail stop and price?

Using the example above (trailing stop length of 20) with a trailing step of 10, if I go long when price is at 50 my trailing stop would be at 30. If price goes to 60, my trailing stop would go to 30, not 40?

So the actual size of the stop is the stop size + step size (when using step function)?
 
@Vladimir Karputov

Another good idea would be a  virtual PSAR trailing stop
 
beto_gauer :
@Vladimir Karputov

Another good idea would be a  virtual PSAR trailing stop

Yes, I have never seen such an application.

 
Possible convert this code for library for add in EA ?
 
Wimax49 :
Possible convert this code for library for add in EA ?

Yes, you can do it. It is open source.

 
Hi  Vladimir

So? Is this placed in the Script folder??
Or? Is this placed in the Experts Folder??

With thanks in advance.
Vladimir Karputov
Vladimir Karputov
  • 2023.10.02
  • www.mql5.com
Trader's profile
 
@MAS-Trading #: So? Is this placed in the Script folder??  Or? Is this placed in the Experts Folder??
It's in the "Experts" folder. It states that in the publication title ... "Virtual Trailing Stop - expert for MetaTrader 5".
 
It gives error when I compile it in the metaeditor??
Reason: