Unusual Trailing Stop Results (huge gains for unknown reason)

Forums ProRealTime English forum ProRealTime platform support Unusual Trailing Stop Results (huge gains for unknown reason)

Viewing 15 posts - 1 through 15 (of 17 total)
  • #54042

    I would like help understanding the results I got while using two types of trailing stops – %trailing and $trailing. 

    While back testing a strategy of mine I decided to try implementing a trailing stop to see if it would improve results.  I used the program’s optimization feature to find the best trailing stop.  The program chose a %trailing stop of approximately “0.05”.  This resulted in huge, unrealistic gains while reporting that it was only in the market less than 2% of the time, even though it was averaging around 2 trades a day.  

    I knew that the results were garbage, so I thought maybe the low percentage was the problem and decided to use a $trailing stop instead.  The program’s optimization chose a stop of “0.01”.  But again, I got unrealistically huge gains while in the market less than 2% of the time.  I also thought it was odd that it was trading about 2 times a day even though I was on a daily period, not an hour or minute period.

    The unrealistic gains seem to work on any security and whether going long or short. 

    Here’s the code that’s causing the weird results:

    DEFPARAM CumulateOrders = False // Cumulating positions deactivated

    positionsize = 1

    //percentstop = .05

    dollarstop = .01

    //BUY positionsize CONTRACTS AT MARKET

    SELLSHORT positionsize CONTRACTS AT MARKET

    //SET STOP %TRAILING percentstop

    SET STOP $TRAILING dollarstop

     

    I’m new to Prorealtime and have only been back testing a month so pardon me if this topic has already been addressed but I would really appreciate an explanation of what is going on and what I’m doing wrong.

    #54048

    Hi Slvr67,

    Because of the trailing stop you have, for some reason PRT runs the backtest automatically without the option “tick by tick”, hence the amazing results.

    Do not worry, it happened to me a couple of times until I realised it was too good to be true.

    Run the strategy again and fill the box tick by tick and you will see the bitter true ;))))

    Best Regards and nice week,

    Juan 

     

    1 user thanked author for this post.
    #54049

    Thank you for your reply, Juan.

    Unfortunately I’m using the free version of Prorealtime and it seems I can only select a time frame of “daily” or longer.  “Tick by tick” is greyed out. 

     

    #54215

    Just so I’m understanding this correctly, if you don’t check the “tick by tick” box when doing a back test (or don’t have it if you’re using the free version) selecting a very small %trailing or $trailing stop will result in the software choosing the optimal time within a candlestick to execute the stop.  And the result is bogus huge gains. Is that correct?

    Are there other functions besides the trailing stops, or situations to be aware of, that produce results very far from what they should be if you don’t use tick by tick mode?

    The reason I ask is because I’m guessing there are free users who might be validating their strategies with back tests and walk forward tests and risking real money on results that may be complete garbage.

    In my case I noticed the problem right away because my strategy was executing enough monthly trades that the difference between the gains I was getting and the increase in gains by just adding the trailing stop was huge.  But if someone is testing a strategy that doesn’t execute trades very often they might not realize that the trailing stop is responsible for most, if not all, of their gains.

    So again, can a free user of Prorealtime be somewhat confident in their back test results as long as they don’t use a small trailing stop or are there other situations that greatly skew results as well that we should be aware of?

    I think Prorealtime offers a lot to free users, so don’t think I’m trying to knock it. I would continue to use it just for its charting capabilities.

    But I don’t want to waste more hours using its back test features unless one of Prorealtime’s developers could answer the questions I’ve asked.

    #54219

     Even with the tick by tick we get very interesting curves but they are wrong because when we go in  and we go out on the same candle the backtest almost always gives you a winner but  it’s not true.
    This has been reported many times to Prorealtime and they do not react.

    1 user thanked author for this post.
    #54222

    I really like this software but that’s very discouraging, Madrosat.

    Thank you for your reply.  I still hope one of the developers will respond.

     

    #54373

    when we go in  and we go out on the same candle the backtest almost always gives you a winner but  it’s not true.

    WRONG! It is not the case with tick/tick mode. You are talking about older versions of the platform.

    Just a reminder: 

    • tick/tick mode is not available to free end of day customers
    • tick/tick mode does not operate in optimisation even if it is checked

    Once again, if any of you encounter a weird bug with trailing stop (or any other instructions) in tick mode, please report it in a new topic (and/or within the platform support console) with a complete description: codes, instruments, timeframe, screenshots, date and hour of the wrong order and any other possible details in order to analyze the issue. 

    #54404

    Hello Nicolas
    In spite of all the respect that I owe you,  look at the two candles on this chart they are given winners whereas they are not
    What is curious is that on the first entry is at 090000 and the exit at 090000
    and 140000 for the input and 140000 for the output of the second
    This is the demo version that I have and I checked on my real account backtest it gives the same thing

    What do you think of that??  I hope to have very good backtest quikly

    Madrosat

    #54416

    Even in tick/tick mode, time tags are always round hours/minutes, ProBacktest will not give you the exact time when an order has triggered.

    For the 090000 order, I see a long entry @1.35287 and an exit @1.35524, this is a winner IMO. Same goes for the 140000 order. 

    Entries and exit are made with the previous upper / lower black lines, correct?

     

     

    #54434

    what is a IMO ?? 

    what is a IMO ??

    Ok for the hours I had again noticed that the exact time was not indicated for the tick by tick

    but for the rest do not agree with regard to the candle of 9 hours the backtest me out before I’m back you agree ??

    The candle of 9 am is red and on the time frame 5 minutes of the same candle decomposed there is no wick going back after my entry.

    On the candle of 14 hours sell shorts 135130 ok but no lock to return on exitshort 134868 you agree ?? So backtest inaccurate

    or else I understand more

     

     

     

     

    #54437

    IMO = “in my opinion” 🙂 

    I have not looked in inferior timeframe to find when your order has triggered. I guess they are STOP or LIMIT ones? I’ll have a deeper look don’t worry.

    Does your chart has “custom trading hours”, not the default one? Because ProBacktest always use the default market one, not the customized one you have set for an instrument list. 

    #54445

     I have not “custom trading hour”

      here the time frame 5 minuts 

    has you can see it’s no possible that the trades are winners.

    I will be very happy if this problem was resolve

    Have a good evening

     

     

    #54451

    Could you please post your trading hours settings for this instrument? Right click on the price chart and choose “custom trading hours”, thanks. 

    #54455

    est ce bien ça que tu veux voir??

    #54474

    Yes, that’s the settings I talked about. Do you encounter the problem elsewhere than a Monday? (sorry for all these questions, I’m currently investigating on my side..)

Viewing 15 posts - 1 through 15 (of 17 total)

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