Trailing Stop Loss

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #29941 quote
    Barney
    Participant
    Senior

    In PRT 10.3 is it in only in backtesting trailing SL don’t work?

    Does it work live?

    If so, you can use it under surveillance!

    #29963 quote
    juanj
    Participant
    Master

    Hi Barney

    I believe the issue is not necessarily with PRT 10.3 but rather the CFD provider.

    I know IG is apparently having issues with the Trailing Stop function in ProOrder.

    I have asked them about this but all they can tell me is that their IT team is ‘working’ on it.

    In the meantime you can try manually coding a trailing stop but someone with more technical skill than myself will have to assist us as this is as far as I could get.

    //custom trailing stop
    
    //trail points having been defined at position open i.e. trail = 100
    
    If longonmarket then
    if close > positionprice then
    If trail > trail - (close - positionprice) then
    trail = trail - (close - positionprice)
    EndIf
    EndIf
    If close < positionprice and close < positionprice - trail then
    SELL AT MARKET
    Elsif close > positionprice and close < positionprice + trail then
    SELL AT MARKET
    EndIf
    ElsIf shortonmarket then
    if close < positionprice then
    If trail > trail - (positionprice - close) then
    trail = trail - (positionprice - close)
    EndIf
    EndIf
    If close > positionprice and close > positionprice + trail then
    EXITSHORT AT MARKET
    ElsIf close < positionprice and close > positionprice - trail then
    EXITSHORT AT MARKET
    EndIf
    EndIf
    #29972 quote
    Barney
    Participant
    Senior

    Ok

    It´s probably the best you can do your own code for the trailing stop.

    IG does not seem to have full control of the problem.

    Unfortunately i do not have those programming skills to code.

    Fortunately there are many here who can code. 🙂

    #30026 quote
    Nicolas
    Keymaster
    Master

    There are already trailing stop code snippets in the blog. Of course stoploss will only move once per bar since code are only read one time each period. So it will not act as the IG “set ptrailing” function.

    #98732 quote
    Mkyr
    Participant
    New

    Hi Nicolas,

    Has this issue been resolved with IG, or is it an ongoing problem?

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Trailing Stop Loss


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Barney @rickardktm Participant
Summary

This topic contains 4 replies,
has 4 voices, and was last updated by Mkyr
6 years, 9 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 03/27/2017
Status: Active
Attachments: No files
Logo Logo
Loading...