NexusFi: Find Your Edge


Home Menu

 





Mid-Bar Entries


Discussion in Platforms and Indicators

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




 
Search this Thread
  #1 (permalink)
Vientomarsol
Port St. Lucie, FL.
 
Posts: 25 since May 2016
Thanks Given: 17
Thanks Received: 9

I'm building a TradeStation strategy for automated execution (robot trader).

I want the ability to enter and exit mid-bar, or in a subsequent bar.
i.e. If conditions are met at 7 minutes into a fifteen minute bar, the entry or exit will be executed immediately without waiting for open of next bar. On the other hand; if conditions are not met for several bars, the strategy will execute mid-bar (of a subsequent bar) when conditions are met.

I am using "[IntrabarOrderGeneration = TRUE]" and coding as follows:

//Long Entry
If MP=0 and H=H[1] then buy this bar;
MP = 1;


//Long Exit
If MP=1 and H=H[1]-.25 then sell this bar;
MP = 0;

The exit is working, and will get me out instantly, but the entry is not. It delays until the open of the next bar.

How should I code the entry statement to execute instantly when conditions are met (in current or future bars)?

Thanks


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
White House Drops First Alien Files Today -- Market Says …
Prediction Markets & Event Contracts
More Than Capable: Hegseths War Warning Validates $114M …
Prediction Markets & Event Contracts
Probability Collapse: Bitcoin $150k Craters from 15% to …
Prediction Markets & Event Contracts
$24.5 Billion Record Month: Prediction Markets Shatter A …
Prediction Markets & Event Contracts
After $87M Settles NO: Irans Nuclear Redline Sets Up the …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
22 thanks
2026 Jlab journal
10 thanks
Trying to learn Volume and price action correlation
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
5 thanks
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,447 since Apr 2013
Thanks Given: 493
Thanks Received: 1,639


Vientomarsol,

welcome to NexusFi. When using intrabar order generation in Tradestation "Next bar" orders will be executed at the next tick that is processed, while "this bar" orders will only be processed at the end of the bar. That's why you are getting your orders filled at the open only.

Regards,

ABCTG


Follow me on X Reply With Quote
  #4 (permalink)
Vientomarsol
Port St. Lucie, FL.
 
Posts: 25 since May 2016
Thanks Given: 17
Thanks Received: 9


ABCTG View Post
Vientomarsol,

welcome to NexusFi. When using intrabar order generation in Tradestation "Next bar" orders will be executed at the next tick that is processed, while "this bar" orders will only be processed at the end of the bar. That's why you are getting your orders filled at the open only.

Regards,

ABCTG



Thanks for your prompt reply.
I'll set-it-up as indicated and see how it works.

Respectlully,


Reply With Quote
Thanked by:
  #5 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,447 since Apr 2013
Thanks Given: 493
Thanks Received: 1,639

Vientomarsol,

you are welcome. By the way you can show your appreciation for a post on NexusFi by clicking the "Thanks" button next to it.

Regards,

ABCTG


Vientomarsol View Post
Thanks for your prompt reply.
I'll set-it-up as indicated and see how it works.

Respectlully,


Follow me on X Reply With Quote




Last Updated on July 13, 2016


© 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