NexusFi: Find Your Edge


Home Menu

 





Is there a way to send an after-hours order in TradeStation?


Discussion in EasyLanguage Programming

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




 
Search this Thread
  #1 (permalink)
MasterYan
San Francisco, CA
 
Posts: 30 since Jul 2016
Thanks Given: 13
Thanks Received: 4

Hello!
I'm trying to send after hours order to SPY in the end of the day. But it always rejected by TradeStation. Is there a way to send an after-hours order?

Something like this:

If Close> Open then buy right now.


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Iran Airspace Collapses 18 Points to 15.5% While Hormuz …
Prediction Markets & Event Contracts
El Clasico Draws $9.2M in Prediction Market Action -- Bi …
Prediction Markets & Event Contracts
Iran Airspace Contract Surges to 33.5% as Project Freedo …
Prediction Markets & Event Contracts
Iran Lebanon Problem Kills Switzerland Talks, Brent at $ …
Prediction Markets & Event Contracts
Hungary Called for Magyar at 97pct, Ending 16-Year Orban …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
197 thanks
Sober Journey With S&P
27 thanks
30 Sessions
20 thanks
Volume Indicators
8 thanks
BERN ALGOS algo trading journal
8 thanks
  #2 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
Systematic Algo Trader
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,270 since Feb 2017
Thanks Given: 2,960
Thanks Received: 2,856


MasterYan View Post
Hello!
I'm trying to send after hours order to SPY in the end of the day. But it always rejected by TradeStation. Is there a way to send an after-hours order?

Something like this:

If Close> Open then buy right now.

This is pretty tricky, since strategies are typically evaluated on the close of a bar. Since you don't know the open until the market opens, you need to wait at least 1 bar for the open to then use it (someone can correct me if I'm wrong).

I don't work with equities in TradeStation, but what you can do is have your strategy make it's entry 1 minute after open.

 
Code
// Minute chart for Data1
// Daily chart for Data2

Condition1 = Time = 930 ;  // assuming NYSE open and exchange time

if Condition1 and
   Close[1] of Data2 > Open of Data2
   then buy 1 shares this bar on close ;
I'm not entirely sure it will work, but give it a try. Remember, the first bar of the new trading day has to close for an order to be placed.

Let me know if this works for you.

~vmodus


Follow me on X Visit my NexusFi Trade Journal Reply With Quote
  #3 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
Systematic Algo Trader
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,270 since Feb 2017
Thanks Given: 2,960
Thanks Received: 2,856


I forgot to mention, you cannot send an order through TradeStation if the market is closed. So in answer to your question, no you cannot send an after-hours order through the desktop application.

Since you posted your question here in the EasyLanguage section, I also assumed you are automating your strategy.

Also, you did not specify which 'Open' (today's open or yesterday's), so I just assumed today's open.

Provide some more details and maybe I can help.

~vmodus


Follow me on X Visit my NexusFi Trade Journal Reply With Quote




Last Updated on June 24, 2020


© 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