NexusFi: Find Your Edge


Home Menu

 





Open trade at a certain time


Discussion in TradeStation

Updated
    1. trending_up 435 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
Exit Strategy
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
My NQ Trading Journal
14 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
13 thanks
GFIs1 1 DAX trade per day journal
11 thanks
  #2 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,662 since Jul 2012
Thanks Given: 1,892
Thanks Received: 7,351


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,662 since Jul 2012
Thanks Given: 1,892
Thanks Received: 7,351


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,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

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