NexusFi: Find Your Edge


Home Menu

 





Open trade at a certain time


Discussion in TradeStation

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




 
Search this Thread
  #1 (permalink)
 highjohn 
Durham, North Carolina
 
Experience: Beginner
Platform: TS
Trading: Futures
Posts: 34 since Mar 2022
Thanks Given: 41
Thanks Received: 3

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?
MegaETH Proves the Crowd Right: Prediction Markets Calle …
Prediction Markets & Event Contracts
April CPI Preview: +3.7% YoY Expected at 8:30 AM ET -- C …
Traders Hideout
SEC and CFTC Unlock Customer Cross-Margining for Treasur …
Treasury Notes and Bonds
Al Arabiya: US-Iran Draft Deal Within Hours Contains Hor …
Prediction Markets & Event Contracts
Iran Lebanon Problem Kills Switzerland Talks, Brent at $ …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
205 thanks
Sober Journey With S&P
21 thanks
30 Sessions
20 thanks
Volume Indicators
8 thanks
Thanks Mike. Godspeed.
7 thanks
  #2 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,737 since Jul 2012
Thanks Given: 1,917
Thanks Received: 7,476


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 X Reply With Quote
  #3 (permalink)
 highjohn 
Durham, North Carolina
 
Experience: Beginner
Platform: TS
Trading: Futures
Posts: 34 since Mar 2022
Thanks Given: 41
Thanks Received: 3



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,737 since Jul 2012
Thanks Given: 1,917
Thanks Received: 7,476


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 X Reply With Quote
Thanked by:
  #5 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,642

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 X Reply With Quote
Thanked by:




Last Updated on April 3, 2023


© 2026 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 - Downloads - Top
no new posts