BreakEven & Trailing Profit: complete function

Forums ProRealTime English forum ProOrder support BreakEven & Trailing Profit: complete function

  • This topic has 137 replies, 23 voices, and was last updated 1 month ago by avatarWim.
Viewing 3 posts - 136 through 138 (of 138 total)
  • #249988
    Wim

    Well, not sure I’m happy with this. This thread is titled “breakeven-trailing-profit”. It was exactly this phenomenon of putting Trailing Profits above the price (for Longs) that works like a charm. And now, this phenomenon is killed and this code turns into an ordinary trailing stop. You don’t need the last min(close…) or max(close…) modifications to prevent trailing profits, if that’s what you really want. Just fill in “1” instead of “100” in the next line:

    I guess the limit orders were introduced for a reason. When you eliminate the possibility of Trailing Profits above the price, no need for limit orders anymore. The whole IF … ELSE … ENDIF around stop and limit order can be replaced by one line “SELL AT SellPrice STOP” for longs. That’s what I call an ordinary trailing stop.

    Personally I will continue with the extra-ordinary Trailing Profit version. In backtest I have seen 75% of the Limit orders (trailing profit) being granted, only 25% needed the SafetyNet I introduced. Nice bunch of bonusses compared to a trailing stop where you always return a bit to the market. I simplified the part with Steps and Chunks and no longer let BasePercent also influence the increments. Same good results, but simpler and less parameters for the optimiser.
    Thanks for your effort.

     

    #249990

    Hi wim.

    Can u post the hole code including ur modifications?

    #249997
    Wim

    Sure @SnorreDK. Please find attached the ITF and a little document with a explanatory diagram and some screen captures.
    I also deleted the lines that, in the original code, update the stop loss after accumulating new positions. My strategies do not accumulate new positions, so I never studied this part of the original, nor checked its correct working. If you want it back, you know where to get it.
    Have a peek in the document, just 3 pages, mainly screen captures, not too much reading.

    1 user thanked author for this post.
Viewing 3 posts - 136 through 138 (of 138 total)

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