Need help coding new trailing stop loss

Forums ProRealTime English forum ProOrder support Need help coding new trailing stop loss

This topic contains 8 replies, has 4 voices, and was last updated by avatar Vonasi 5 months ago.

View all attachments
Viewing 9 posts - 1 through 9 (of 9 total)
  • #91163

    So im using this alot:

    And my question is: Could someone help me change this trailing stop to include:

    When trade is profitable and the trailing stop loss begins, i want the stop loss to move up (more tight) for every Bar that has passed where trade is not hitting new highs.

    Example: see pic.

     

    Edit: So lets say a trade is going your way, your 100 pips in profit, the MTF stop loss is now = 50 pips profit.

    Lets say that the trade is not hitting new highs, so for every Bar/candle that goes by without a new high, the stop loss keeps tightening up.

    The idea is that If tthe market continues to rally up, the stop loss will follow the price higher and higher, as is normal with the MTF trailing stop loss today. But if the market stops rallying up andf starts moving sideways the market MIGHT come crashing down. Lets say it goes sideways for 15 bars before crashing down. I would love my stop loss to not be 50, but maybe 70 by that time..

    Hope this is clear.

     

    Attachments:
    #91171

    Instead of using it as an increasing step, you could turn it into a downward step, that is instead of 10 being added to your TRADEPRICE, whay don’t you subtract it from HIGH (if it was a higher HIGH)?

    #91174

    I attach a pic to make it clearer.

    Attachments:
    #91177

    Im not sure that would do what i want?

    I would like the MTF trailing stop to work as it is today, just to add a feature thats saying

     

    “If there is no new higher close, then move trailing stop +n pips higher, but if the next candle has a higher close than close[1] then it should not move the stop loss, unless the new higher close is the highest close in the trade, then the normal MTF code would move the stop loss as it does today.”

    #91184
    #91234

    I tried this modified code, but I could not find any trade to fully test it:

     

    1 user thanked author for this post.
    #91328

    Nice, will test it and report back. Thanks

    #91403

    Hi guys,

    Anyone interested in a bit of freelance coding work? Need help with a simple tool to help me manage my stops.

    #91408

    Mkyr – you can either post your idea in this forum and someone might be able to assist you out of the kindness of their heart or alternatively you can use the programming services available here:

    https://www.prorealcode.com/trading-programming-services/

    I also notice that you have posted a very similar request in another topic. Please do not double post as it just leads to confusion and wasted effort for those trying to help you.

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

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