Trailing stop moving the wrong way

Viewing 6 posts - 16 through 21 (of 21 total)
  • Author
    Posts
  • #131533 quote
    robertogozzi
    Moderator
    Master

    TrailingStart and TrailingStep can either be different or equal, it’s up to you.

    I think the problem is accumulating positions, as TRADEPRICE is an average af the entry price of all positions, so it will change as any single positions is added.

    Sorry guys, Nicolas just reminded me that POSITIONPRICE is the average price of all open positions, while TRADEPRICE is the last price traded. This will not affect the above code, though.

    nonetheless and GraHal thanked this post
    #154253 quote
    deleted23092025
    Participant
    New

    Have you came up with a solution of this? I dont have the same trialingstop code but it happend to me today. I put the example here, the stop went from minus 200 to minus 20 when the price went up. The price went up a little more and the stop came down to minus 40. Is this a bug? I cant really say its a problem with the code.

    #154261 quote
    deleted23092025
    Participant
    New

    By watching my code I think that if the trailingstops kicks in on the wrong side of the entry position the trailingstop will continue the wrong way.

    BUT my question is why is trailing stop going on the wrong side as it should secure a “win”

    #154263 quote
    nonetheless
    Participant
    Master

    I haven’t noticed this problem for a while now. I think it has something to do with the TS being in conflict with the IG minimum stop distance.

    #154268 quote
    deleted23092025
    Participant
    New

    Hmm okay.. But lets say this happens “attached picture” (trailing stopp kicked in on wrong side of entry)

    And the price move up (ath) will the stop move up or down? I mean if it moves up its completly fine but Im scared it wont?

    a7ad4730c426c98908b37f93bf19f8f0.png a7ad4730c426c98908b37f93bf19f8f0.png
    #154275 quote
    nonetheless
    Participant
    Master

    what TS code are you using?

Viewing 6 posts - 16 through 21 (of 21 total)
  • You must be logged in to reply to this topic.

Trailing stop moving the wrong way


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 20 replies,
has 4 voices, and was last updated by nonetheless
5 years, 2 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/12/2020
Status: Active
Attachments: 2 files
Logo Logo
Loading...