NexusFi: Find Your Edge


Home Menu

 





Selling on the closing of the bar


Discussion in TradeStation

Updated
    1. trending_up 2,368 views
    2. thumb_up 3 thanks given
    3. group 1 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

Selling on the closing of the bar

  #1 (permalink)
Prophet85
Gothenburg Sweden
 
Posts: 75 since Jul 2019
Thanks Given: 53
Thanks Received: 24

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

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
What broker to use for trading palladium futures
Commodities
Quant vue
Trading Reviews and Vendors
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
MC PL editor upgrade
MultiCharts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
What is Markets Chat (markets.chat) real-time trading ro …
80 thanks
Spoo-nalysis ES e-mini futures S&P 500
55 thanks
Tao te Trade: way of the WLD
46 thanks
Just another trading journal: PA, Wyckoff & Trends
35 thanks
The Program
19 thanks
  #2 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,666 since Jul 2012
Thanks Given: 1,892
Thanks Received: 7,360


Prophet85 View Post
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

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.

Follow me on Twitter Reply With Quote
Thanked by:
  #3 (permalink)
Prophet85
Gothenburg Sweden
 
Posts: 75 since Jul 2019
Thanks Given: 53
Thanks Received: 24



kevinkdog View Post
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?

Best regards

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


Prophet85 View Post
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?

Best regards

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.

Follow me on Twitter Reply With Quote
Thanked by:
  #5 (permalink)
Prophet85
Gothenburg Sweden
 
Posts: 75 since Jul 2019
Thanks Given: 53
Thanks Received: 24


kevinkdog View Post
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.

Thank you, I appreciate your advice!

Have a nice weekend!

Reply With Quote




Last Updated on August 7, 2020


© 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