Can a trailing stop be added to this EA?
Results 1 to 10 of 10

Thread: Can a trailing stop be added to this EA?

  1. #1
    I've a commerce management EA using a breakeven trigger and a breakeven change characteristic in which the stop is moved to breakeven plus a shift X number of pips. I have to have a stop additional that will take over following the breakeven change is triggered. As an instance, if the breakeven amount is 50 and the breakeven change is set to 25, after I am 50 pips up the stop is moved to 25 pips. The stop ought to take over at 25 and must be flexible. Or if a second level could be added to the breakeven change in which the priced moved another X number of pips, it could change the stop greater, which would work. Any help will be appreciated, thanks.
    https://www.forexforum.co.za/attachm...1721300881.mq4

  2. #2
    Ttt I found 's EA, but that is a bit elaborate for what I need.

  3. #3
    this is my tracking stop code based on your own criteria. I expect as expected, it might work.
    https://www.forexforum.co.za/attachm...1764025123.mq4

  4. #4
    Quote Originally Posted by ;
    this is my trailing stop code according to your criteria. I hope as anticipated, it could work.
    Very tidy stuff sangmane. The hidden_sl hidden_tp made the mind spin although I tried working out an add-on.
    Will the concealed functions still be able to do their tasks along with your extra code from the trailing stop function.

    To my cutpaste degree of coding, resembles the hidden functions may be utilized or the changed trailstop function.

    But then may have been the way that it worked previously anyway. lol.

    cheers

  5. #5
    I appreciate the help, but I really don't see the input signal for the stop. How do I change how far it paths or how can I set it to true or false? Am I missing something?

  6. #6
    Quote Originally Posted by ;
    I appreciate the help, but I don't see the input signal for the trailing stop. How do I change how far it trails or how do I set it to untrue or true? Am I missing something?
    It is the Breakevenshift input that is the trail portion.

  7. #7
    (the code comprised typo error, I've uploaded the right one)

    here is the logic of the added trail stop:
    supposed that receptive price is 1.40000
    in long position:
    - when price moved to 1.4050 (open price 50pips), sl is put to 1.4025 (open price 25 pips). This is what your first EA did.
    - when price moved to 1.4075 (past sl 50 pips), sl is place to 1.4050 (last sl 25 pips)
    - when price moved to 1.4100 (last sl 50 pips), sl is put t0 1.4075 (final sl 25 pips).
    And so on. . The price is not trailed every single point the price move in our direction it's trailed only at every increment of price by 25 pips, started after sl has been moved to openprice 25 pips.

    I'm sorry if that is not what you need, possibly a simple trailing stop with another shift value? Or you may have 2 breakeven and breakeven shift. One for the first goal, and one after the first target has been achieved?

  8. #8
    What if I want it to change 25 pips but only path 10 pips after that? That is why I was searching for a separate trailing stop that could take over following the change be able to turn on or off and but be flexible, is that possible?

  9. #9
    pls find the attached code under. Allow me to know if it works or not. I also submitted an EA that using this trailing code, together with the tester chart. Not bad for a EA.
    https://www.forexforum.co.za/attachm...9214172218.mq4
    https://www.forexforum.co.za/attachm...1453958014.mq4

  10. #10
    Beautiful, precisely what I was looking for. I was going to only use s EA if nobody can do it, but I got too confused on all the inputs he places in it (no offense Steve). I can try it out next week, thanks a lot!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.