NexusFi: Find Your Edge


Home Menu

 





Mid-Bar Entries


Discussion in Platforms and Indicators

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




 
Search this Thread

Mid-Bar Entries

  #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?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
About a successful futures trader who didnt know anythin …
Psychology and Money Management
MC PL editor upgrade
MultiCharts
REcommedations for programming help
Sierra Chart
Trade idea based off three indicators.
Traders Hideout
 
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629


Vientomarsol,

welcome to futures.io. 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 Twitter 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 futures.io. 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,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

Vientomarsol,

you are welcome. By the way you can show your appreciation for a post on futures.io 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 Twitter Reply With Quote




Last Updated on July 13, 2016


© 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