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)
- This topic has 16 replies, 4 voices, and was last updated 6 years ago by Madrosat.
-
-
11/26/2017 at 9:18 PM #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.
11/26/2017 at 9:49 PM #54048Hi 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.
11/26/2017 at 10:12 PM #5404911/28/2017 at 8:20 AM #54215Just 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.
11/28/2017 at 8:54 AM #54219Even 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.
11/28/2017 at 9:00 AM #5422211/29/2017 at 5:28 PM #54373when 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.
11/30/2017 at 9:46 AM #54404Hello 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 thingWhat do you think of that?? I hope to have very good backtest quikly
Madrosat
11/30/2017 at 12:03 PM #54416Even 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?
11/30/2017 at 3:37 PM #54434what 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
11/30/2017 at 4:51 PM #54437IMO = “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.
11/30/2017 at 5:49 PM #5444511/30/2017 at 10:50 PM #5445112/01/2017 at 5:45 AM #5445512/01/2017 at 2:01 PM #54474 -
AuthorPosts
Find exclusive trading pro-tools on