Need help with MFE stop loss

Forums ProRealTime English forum ProOrder support Need help with MFE stop loss

Viewing 2 posts - 1 through 2 (of 2 total)
  • #127673

    Hi all, i have previously had a word document with a bunch of algostuff written down, my computer with that document however has crashed and for some reason, the only thing i didnt get out from it, was the following thing:

    I have previously asked for help with this: https://www.prorealcode.com/blog/learning/trailing-stop-max-favorable-excursion-mfe/

    Im not sure if it has been requested before but i could not find it, using the search bar, altough i know i have asked about this before (im pretty sure at least). Sorry for asking about it again now maybe 1-2 years later 🙂 Would appreciate the help as i dont think its too hard to do, i just want it done right.

    I have earlier recieved help to modify the MFE trailing stop in the link so that it would Start after XX pips in profit. This is the code:

    However what i need help with is to evolve this MFE trailing stop further, i hope my example is easy to understand.

    Lets say the Target = 100 pips.

    If the trade is currently 50 pips in profit: Start a trailing stop loss of 25 pips.

    But if the trade moves up and is now 85 pips in profit: Start a trailing stop loss of 10 pips.

     

    So in other words: If the trade moves very close to the target, i want to change the stop loss so it gets tighter. I had one code with 3 levels in total, but i think only 2 is needed, at least for my use 🙂

    Any help is very appreciated.

    #127696

    Nothing to do with your question but at a glance I think the MFE is calculated wrong. When long the MFE is not the close but the high and when short it is not the close but the low. So it should be:

     

Viewing 2 posts - 1 through 2 (of 2 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login