Trailingstop vid graphonprice

Forums ProRealTime English forum ProOrder support Trailingstop vid graphonprice

Viewing 9 posts - 1 through 9 (of 9 total)
  • #238929

    Hi,

    Im trying to use an algo with a trailingstop, but the trailingstop dosent seem to be working as intended
    Does anyone know a code with a working trailingstop that you can use with graphonprice so I can view the behavior of the trailingstop?

    Im using a similar code like this:

    #238932

    Did you try below

     

    2 users thanked author for this post.
    #238985

    Did you try below

    Hi,

    I haven’t been able to try the code yet, but I will tomorrow. Will get back to you with the results 🙂

    Btw, is there a way to access prt from your phone? I’m using prt through IG…

    Thank you 🙂

    #238987

    There is a web based version, but no AutoTrading yet.

    Compare 3 versions on the link below

    https://www.prorealtime.com/en/compare-trading-platforms

     

    #239014

    Hi again,

    Thank you so much!

    question,

    can graphonprice be used when using a autotradingsystem?

    I thought that only “graph” that couldet be used when using a automatic tradingsystem?

     

    #239032

    Neither GRAPH nor GRAPHONPRICE can be used when Autotrading on live data, but both can be used when backtesting an Algo and then // comment out after finished backtesting etc.

    1 user thanked author for this post.
    #239037

    Ah okay, so If I want some visual qs, I need to use an indicator, correct?

    I just read up on Arrays, can I use that so see where my trailingSL and SL is and so on?

    Thank you once again GraHal, much appreciated 🙂

    #239039

    When Algo is trading Live all we get to see is equity curve and positions.

    GRAPHS and GRAPHONPRICE are best for debugging Stops and Taget and Trailing Stops etc, but only when backtesting Algos.

    To check performance before going Live, we use our Demo Accounts … have you enabled your PRT Demo Account?   It is enabled on the IG Dashboard.

     

    #239088

    I think there’s an error in above code, lines 14 and 18 appear to set newSL with none zero value, however, lines 35 and 36 look for a none zero newSL and exits.

    Similar scenario for the short.

     

    I played around with some code to display  the trailing stop (TS)  to see what’s what using a out of thin air entry condition.

    I added in a default TS value , TSdefaultAmt,  because zero messes with the charts auto scale with graphonprice.

     

    When the yellow line is horizontal, it represents the TS start threshold level above the entry price , TSstartLvl.

    When price closes above, the TS is active, TSactive = 1,  which triggers the TS.

     

    After entry but before TS triggered, The horizontal orange line represent the default TS.

    After being triggered, TS jumps to the startprice + step amount.

    Subsequent bars increment the TS ‘TSL’ by the step amount.

     

    If close triggers the exit condition, the trade is exited.

    If low hits the default stop level it is also exited.

     

    As I worked through I graphed  some variables.

    Some are true/false and some are number values.

    Using cursor values…

    The values are scaled within a ‘1’ range and  +n value offset then to the ‘y’ scale.

    The *0.75 are the booleans  where the integer value is false and value+0.75 is true.

    The*0.00001 are values, just look at decimal portion and crop off last digit.

     

    see what you think.

     

     

     

     

     

    2 users thanked author for this post.
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 Login