Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
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
Can you help answer these questions from other members on NexusFi?
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.
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;