NexusFi: Find Your Edge


Home Menu

 





Open trade at a certain time


Discussion in TradeStation

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




 
Search this Thread

Open trade at a certain time

  #1 (permalink)
 highjohn 
Durham, North Carolina
 
Experience: Beginner
Platform: TS
Trading: Futures
Posts: 26 since Mar 2022
Thanks Given: 24
Thanks Received: 2

Hi,

Is there a way to buy or sell at a certain time rather than at close of the bar?

If venter = 1 then Begin
If currententries = 0 then Buy("B1") Noofcontracts contract this bar at Close;
If currententries = 1 then Buy("B2") Noofcontracts contract this bar at Close;
venter= 0;
end;

Thanks!

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
Cheap historycal L1 data for stocks
Stocks and ETFs
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Better Renko Gaps
The Elite Circle
Quant vue
Trading Reviews and Vendors
 
  #2 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,666 since Jul 2012
Thanks Given: 1,892
Thanks Received: 7,360


highjohn View Post
Hi,

Is there a way to buy or sell at a certain time rather than at close of the bar?

If venter = 1 then Begin
If currententries = 0 then Buy("B1") Noofcontracts contract this bar at Close;
If currententries = 1 then Buy("B2") Noofcontracts contract this bar at Close;
venter= 0;
end;

Thanks!

if time=XXX then buy next bar at open;

You just have to have a bar with the time you list in the code.

Follow me on Twitter Reply With Quote
  #3 (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
if time=XXX then buy next bar at open;

You just have to have a bar with the time you list in the code.

Thank you. But the 'next bar' on the hourly chart may be after quite a bit of time. Isnt it?

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


highjohn View Post
Thank you. But the 'next bar' on the hourly chart may be after quite a bit of time. Isnt it?


If time is an issue, you could use stop or limit orders:


If XXXX then buy next bar at YYYY stop;

If XXXX then buy next bar at ZZZZ limit;


those will execute during the next bar.

Also, you could look at Intrabar Order Generation, which would execute at next tick once a condition turns true. But you can't backtest with that.

Follow me on Twitter Reply With Quote
Thanked by:
  #5 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

highjohn,

another approach could be using a lower timeframe for the trading. Either in conjunction with a higher timeframe on Data 2 or by tracking higher timeframe values internally within the code using the underlying lower timeframe.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
Thanked by:




Last Updated on April 3, 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