NexusFi: Find Your Edge


Home Menu

 





backtest problem with trailing stop on a daily chart


Discussion in Traders Hideout

Updated
      Top Posters
    1. looks_one alko with 3 posts (1 thanks)
    2. looks_two SMCJB with 2 posts (0 thanks)
    3. looks_3 kevinkdog with 1 posts (2 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 3,575 views
    2. thumb_up 3 thanks given
    3. group 3 followers
    1. forum 6 posts
    2. attach_file 1 attachments




 
Search this Thread

backtest problem with trailing stop on a daily chart

  #1 (permalink)
 alko 
San Diego, USA
 
Experience: Intermediate
Platform: MC
Trading: All
Posts: 48 since Aug 2016
Thanks Given: 7
Thanks Received: 14

Hello all,

I have a strategy (as many of you) that uses daily bars for entries and trailing stops for exits. The problem with daily bars is that is you set stops too narrow then MC (I am using Multicharts and TS too) test trailing stops from four points on the bar OHLC during the backtest. So, if say the strategy is long, then MC checks L of the bar and from that defines whether my trailing stop worked or not. But of course it does not know how the bar was filled. The only solution to this problem I found was to create a chart with two data where data1 is 1 minute data for the instrument and data2 is daily data for the same instrument, thus i use data1 for execution and data2 for model calculations that defines entries and exists (another solution would be not to put stops too narrow but it does not look like appropriate solution to me). Also, it appears to me that if only stop loss is used (not trailing) then backtest would close the position at the appropriate price.

Question - what are other solutions to the trailing stop problem for backtest on the daily bars to make executions mirror live trading? Any suggestions/referrences are much appreciated.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Deepmoney LLM
Elite Quantitative GenAI/LLM
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Exit Strategy
NinjaTrader
Online prop firm The Funded Trader (TFT) going under?
Traders Hideout
ZombieSqueeze
Platforms and Indicators
 
  #3 (permalink)
 
SMCJB's Avatar
 SMCJB 
Houston TX
Legendary Market Wizard
 
Experience: Advanced
Platform: TT and Stellar
Broker: Advantage Futures
Trading: Primarily Energy but also a little Equities, Fixed Income, Metals and Crypto.
Frequency: Many times daily
Duration: Never
Posts: 5,041 since Dec 2013
Thanks Given: 4,375
Thanks Received: 10,192


Apologies if you already know this but since you mention TS, I thought I would mention it just in case.
In Tradestation there is a special feature purely to do what you want.



Reply With Quote
  #4 (permalink)
 alko 
San Diego, USA
 
Experience: Intermediate
Platform: MC
Trading: All
Posts: 48 since Aug 2016
Thanks Given: 7
Thanks Received: 14


SMCJB View Post
Apologies if you already know this but since you mention TS, I thought I would mention it just in case.
In Tradestation there is a special feature purely to do what you want.



No worries as any help is much appreciated.
Yes, i have seen it and used it. The problem here is that 1 minute data for TS is limited. I am not sure why but for some instruments data is more less ok in terms of look back period for 1 minute and in some cases it is very short. For instance, when backtesting continious non-adjusted ES futures, i got the following message from TS:

- You strartegy will begin calculating on 09/28/2000 but the data required for Look-Inside-Bar Back-testing is only available starting on 08/25/2016. Strartegy calculation prior to 08/25/2016 will not use Look-Inside-Bar testing.

That is way too short. May be i need to load up the quotes first somehow, not sure about that. ?

Started this thread Reply With Quote
  #5 (permalink)
 
SMCJB's Avatar
 SMCJB 
Houston TX
Legendary Market Wizard
 
Experience: Advanced
Platform: TT and Stellar
Broker: Advantage Futures
Trading: Primarily Energy but also a little Equities, Fixed Income, Metals and Crypto.
Frequency: Many times daily
Duration: Never
Posts: 5,041 since Dec 2013
Thanks Given: 4,375
Thanks Received: 10,192


alko View Post
For instance, when backtesting continious non-adjusted ES futures, i got the following message from TS:

- You strartegy will begin calculating on 09/28/2000 but the data required for Look-Inside-Bar Back-testing is only available starting on 08/25/2016. Strartegy calculation prior to 08/25/2016 will not use Look-Inside-Bar testing.

I'm not a TS expert but I've never seen that message before. @kevinkdog can u help?

Reply With Quote
  #6 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,647 since Jul 2012
Thanks Given: 1,890
Thanks Received: 7,338


SMCJB View Post
I'm not a TS expert but I've never seen that message before. @kevinkdog can u help?

It probably tried to run strategy before all data was loaded. I would trun off the strategy and turn it back on and see if the message returns - it should not.

Follow me on Twitter Reply With Quote
Thanked by:
  #7 (permalink)
 alko 
San Diego, USA
 
Experience: Intermediate
Platform: MC
Trading: All
Posts: 48 since Aug 2016
Thanks Given: 7
Thanks Received: 14


kevinkdog View Post
It probably tried to run strategy before all data was loaded. I would trun off the strategy and turn it back on and see if the message returns - it should not.

Yes, you are absolutely right. I did not allow the data (minute data) to upload to a daily chart and set the model on. For some reason, it stops loading up data while model status is on.

Started this thread Reply With Quote
Thanked by:




Last Updated on October 10, 2016


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts