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,
Many times I test strategies (only futures trading) on Tradestation with daily bars with "sell this bar on close" as I don't always want to be in the market overnight or over the weekend.
Now obviously "sell this bar on close" doesn't work for live trading in Tradestation.
So I would like to know how some of you guys handle this "problem". How can I make Tradestation sell at the close of the session so it as closely as possible resembles my back testing when using "sell this bar on close"? I'm sure there are many solutions and I would love to hear a few of them.
Regards
P
Can you help answer these questions from other members on NexusFi?
If you must keep daily bars, then there is really no solution to exit before end of day.
If you switch to 1440 minutes bars, you can create a custom session than ends 1 minute before exchange close, and then "sell this bar on close" or "setexitonclose" will work.
Note though with 1440 minute bars, you will run into close price issues. in 1440 minute bars, close is the last traded price, but for daily bars, close is the exchange settlement price.
For markets like Gold (which has a 1:30 PM exchange settlement close time, but a 5 PM last traded close time) this could be a big deal.
Test it first to make sure it does not impact your strategy too much.
Wow an answer from Kevin Davey himself, what a privilege .
Would you say that making a session that ends a few minutes earlier is the best way to achieve what I want? Are there any other ways? I was wondering if maybe it is possible to use the intrabar order generation setting that Tradestation have...
Also a question regarding your example with the gold contract where the settlement price is used when backtesting on daily bars. Wouldn't I be able to build bars and use a session that resembles the times that the daily bars use?
Thanks, I am no one special, but I'm glad you know who I am!!
You could use intrabar order gen, but you might not be able to backtest accurately with that.
There are likely a few other solutions, but none are really easy - especially if you want live trading to match the backtest (that is what I always aim for).
You could have a custom session for Gold that ends at 130 PM, and that should be close to the Daily bar, except that you'd lose prices from 130 PM to 5 PM.
You best approach is to figure out what is most important (backtest matching live? not holding overnight? using settlement close instead of last price traded? etc.) and then once you know that you'll be able to derive a solution.
FYI, I have had Daily bar systems that look good, but fall apart with 1440 minute bars, and vice versa.