NexusFi: Find Your Edge


Home Menu

 





Tradestation built-in stops wildly inaccurate?


Discussion in TradeStation

Updated
      Top Posters
    1. looks_one kevinkdog with 3 posts (2 thanks)
    2. looks_two poolguy with 2 posts (0 thanks)
    3. looks_3 gmt123 with 1 posts (0 thanks)
    4. looks_4 highjohn with 1 posts (0 thanks)
    1. trending_up 903 views
    2. thumb_up 2 thanks given
    3. group 3 followers
    1. forum 6 posts
    2. attach_file 0 attachments




 
Search this Thread

Tradestation built-in stops wildly inaccurate?

  #1 (permalink)
poolguy
Stockholm Sweden
 
Posts: 2 since Jan 2023
Thanks Given: 0
Thanks Received: 0

Hi, I decided to try out Tradestation's backtesting engine. I'm playing around with a simple strategy which enters on 60m bars and which makes use of the built-in stop function "setdollartrailing". I've realized that the only way to get correct simulation of stops is to use look-inside-bar with 1 tick but then you can't backtest very far back. Not using look-inside-bar gives rise to huge differences in some cases. So the only way to "properly" backtest with stops far back in time is to stop out at the next bar? For example by using 1m bars as data1 and 60m bars as data2 and trigger stops as data1 breaches the stop level(?)

For those of you experienced in Tradestation, have I understood this correctly? Exactly how do the built-in stops work in simulation when not using the look-inside-bar testing?

Thanks

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
What broker to use for trading palladium futures
Commodities
REcommedations for programming help
Sierra Chart
ZombieSqueeze
Platforms and Indicators
Trade idea based off three indicators.
Traders Hideout
 
  #2 (permalink)
 gmt123 
Sydney Australia
 
Experience: Intermediate
Platform: TS
Trading: Currency futures
Posts: 3 since Oct 2011
Thanks Given: 7
Thanks Received: 1

Ask this question in the TS Forums.

Reply With Quote
  #3 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,666 since Jul 2012
Thanks Given: 1,892
Thanks Received: 7,360



poolguy View Post
Hi, I decided to try out Tradestation's backtesting engine. I'm playing around with a simple strategy which enters on 60m bars and which makes use of the built-in stop function "setdollartrailing". I've realized that the only way to get correct simulation of stops is to use look-inside-bar with 1 tick but then you can't backtest very far back. Not using look-inside-bar gives rise to huge differences in some cases. So the only way to "properly" backtest with stops far back in time is to stop out at the next bar? For example by using 1m bars as data1 and 60m bars as data2 and trigger stops as data1 breaches the stop level(?)

For those of you experienced in Tradestation, have I understood this correctly? Exactly how do the built-in stops work in simulation when not using the look-inside-bar testing?

Thanks

Don't use setdollartrailing or setpercenttrailing in backtest, ever. That is my rule.

I have no idea if they work in real time.

Follow me on Twitter Reply With Quote
  #4 (permalink)
poolguy
Stockholm Sweden
 
Posts: 2 since Jan 2023
Thanks Given: 0
Thanks Received: 0


kevinkdog View Post
Don't use setdollartrailing or setpercenttrailing in backtest, ever. That is my rule.

I have no idea if they work in real time.

Thanks for your reply.
I have monitored those functions in sim-mode and they seem to work in real time but the backtest results can be way off.
Say I watch the strategy executing live throughout the day and take a screenshot of todays trades from the "Strategy performance report" at the end of the day. Next day, I backtest the same script and look at yesterdays trades in the "Strategy performance report" and compare to my screenshot from the day before. The backtested exits, executed via "setdollartrailing", can differ a lot from what I observed live the day before. I have instead coded trailing stops directly on 1m bars while the entries are done on 60m bars.

Reply With Quote
  #5 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,666 since Jul 2012
Thanks Given: 1,892
Thanks Received: 7,360


poolguy View Post
Thanks for your reply.
I have monitored those functions in sim-mode and they seem to work in real time but the backtest results can be way off.
Say I watch the strategy executing live throughout the day and take a screenshot of todays trades from the "Strategy performance report" at the end of the day. Next day, I backtest the same script and look at yesterdays trades in the "Strategy performance report" and compare to my screenshot from the day before. The backtested exits, executed via "setdollartrailing", can differ a lot from what I observed live the day before. I have instead coded trailing stops directly on 1m bars while the entries are done on 60m bars.

This is a known longstanding "feature" (issue) with setdollartrailing and setpercenttrailing. I don't allow traders I work with to use them at all.

Follow me on Twitter Reply With Quote
Thanked by:
  #6 (permalink)
 highjohn 
Durham, North Carolina
 
Experience: Beginner
Platform: TS
Trading: Futures
Posts: 26 since Mar 2022
Thanks Given: 24
Thanks Received: 2


kevinkdog View Post
This is a known longstanding "feature" (issue) with setdollartrailing and setpercenttrailing. I don't allow traders I work with to use them at all.

Kevin, What are the alternatives to setpercenttrailing?

Is this the only option? Tradestation SetPercentTrailing Replacement (https://community.tradestation.com/Discussions/Topic_Archive.aspx?Topic_ID=8714)

Reply With Quote
  #7 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,666 since Jul 2012
Thanks Given: 1,892
Thanks Received: 7,360


highjohn View Post
Kevin, What are the alternatives to setpercenttrailing?

Is this the only option? Tradestation SetPercentTrailing Replacement (https://community.tradestation.com/Discussions/Topic_Archive.aspx?Topic_ID=8714)

Just create your own is an option. Here is a simple one that exits at next bar open if the openpositionprofit drops more than $1000 from the maxpositionprofit. Maxpositionprofit is calculated during the bar, and compared to openpositionprofit measured at the bar close.

If maxpositionprofit-openpositifionprofit > 1000 then begin
sell next bar at market;
buytocover next bar at market;
end;

Follow me on Twitter Reply With Quote
Thanked by:




Last Updated on April 13, 2023


© 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