Intrabar order generation - not recommended, but why? - futures io
futures io futures trading



Intrabar order generation - not recommended, but why?


Discussion in Traders Hideout

Updated
      Top Posters
    1. looks_one Quick Summary with 1 posts (0 thanks)
    2. looks_two wldman with 1 posts (1 thanks)
    3. looks_3 Pa Dax with 1 posts (0 thanks)
    4. looks_4 BoomGoesDynamite with 1 posts (0 thanks)
    1. trending_up 1,947 views
    2. thumb_up 14 thanks given
    3. group 5 followers
    1. forum 6 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Intrabar order generation - not recommended, but why?

(login for full post details)
  #1 (permalink)
Walnut Creek, CA/USA
 
Experience: Beginner
Platform: Tradestation
Broker: Tradestation
Trading: Interest Rate Futures
 
Posts: 6 since Sep 2018
Thanks: 2 given, 1 received

Hi all,

I tried to search through previous threads to see if this has been discussed, but didn't find one. If I missed it I do apologize!

But anyways, when reading about strategies and whatnot, I see a common theme which is to not generate the orders inside of the bars. My question is.. why not? I understand that bars can "solidify" some information, but that information is essentially completely arbitrary based upon how one decides to form the bars. Is there a reason why a lot of strategies aim towards "wait for the close of the bar to see if the condition is met" rather than "as soon as the conditions are met get in on it NOW"? Is it just that it's easier to evaluate a strategy when one can determine that it follows their rules? Does the close provide some kind of "confirmation"? Honestly just looking for some opinions on this

Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
Data for the YM and RTY for NT8 to practice on?
NinjaTrader
COTbase for quant trading?
Elite Algorithmic NinjaTrader Trading
Webinar: Finding your own way in trading w/Adam Grimes
The Elite Circle
Indicators for pair trading MES and M2K
Platforms and Indicators
Anyone have access to older, intraday data for stocks(AXP)?
Stocks and ETFs
 
 
(login for full post details)
  #3 (permalink)
 
 
Posts: 2,979 since Jul 2012
Thanks: 1,576 given, 5,902 received



technoloG View Post
Hi all,

I tried to search through previous threads to see if this has been discussed, but didn't find one. If I missed it I do apologize!

But anyways, when reading about strategies and whatnot, I see a common theme which is to not generate the orders inside of the bars. My question is.. why not? I understand that bars can "solidify" some information, but that information is essentially completely arbitrary based upon how one decides to form the bars. Is there a reason why a lot of strategies aim towards "wait for the close of the bar to see if the condition is met" rather than "as soon as the conditions are met get in on it NOW"? Is it just that it's easier to evaluate a strategy when one can determine that it follows their rules? Does the close provide some kind of "confirmation"? Honestly just looking for some opinions on this

You can't backtest accurately with IBOG.

Follow me on Twitter Reply With Quote
The following user says Thank You to kevinkdog for this post:
 
(login for full post details)
  #4 (permalink)
Legendary Price Action Scientist
Netherlands
 
Experience: Advanced
Platform: NinjaTrader, IB TWS
Broker: InteractiveBrokers, CQG
Trading: ES
 
Pa Dax's Avatar
 
Posts: 1,064 since Oct 2017
Thanks: 1,567 given, 5,492 received


technoloG View Post
Hi all,

I tried to search through previous threads to see if this has been discussed, but didn't find one. If I missed it I do apologize!

But anyways, when reading about strategies and whatnot, I see a common theme which is to not generate the orders inside of the bars. My question is.. why not? I understand that bars can "solidify" some information, but that information is essentially completely arbitrary based upon how one decides to form the bars. Is there a reason why a lot of strategies aim towards "wait for the close of the bar to see if the condition is met" rather than "as soon as the conditions are met get in on it NOW"? Is it just that it's easier to evaluate a strategy when one can determine that it follows their rules? Does the close provide some kind of "confirmation"? Honestly just looking for some opinions on this

Maybe you're confusing two things? Not sure but just a guess.
I'm usually entering a trade during a bar (i.e. buying on a stop above or selling on a stop below a bar). It's just that the decision to enter on the next bar is indicated by the close of that bar before.
So even in very strong breakouts I always wait for the bar to close before I decide to get in or out. By entering earlier you might get your occasional one, two or three ticks favor but at least once a day you can easily get trapped as well, especially on news events like FOMC.

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #5 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,728 received


technoloG View Post
Hi all,

I tried to search through previous threads to see if this has been discussed, but didn't find one. If I missed it I do apologize!

But anyways, when reading about strategies and whatnot, I see a common theme which is to not generate the orders inside of the bars. My question is.. why not? I understand that bars can "solidify" some information, but that information is essentially completely arbitrary based upon how one decides to form the bars. Is there a reason why a lot of strategies aim towards "wait for the close of the bar to see if the condition is met" rather than "as soon as the conditions are met get in on it NOW"? Is it just that it's easier to evaluate a strategy when one can determine that it follows their rules? Does the close provide some kind of "confirmation"? Honestly just looking for some opinions on this


When talking about generating intra-bar orders, it is important to distinguish

- between entry orders and exit orders
- between market orders, stop orders and limit orders
- between trading indicators signals and price action

Let us go through this step by step. I will start with exit orders.


Exit orders:

When you add a bracket to your existing position, you will typically add a profit target and a stop loss. The respective order types are a limit order and a stop order. These order types typically reside at the exchange and will be executed intra-bar. Why wouldn't you execute them intra-bar?

To avoid your stop from being triggered by stop hunters you may decide not to place a hard stop at the exchange but simulate the stop with a strategy which is running on your computer. In that case you may wait for a bar close beyond the stop value and then exit your position with a market order at the bar close.

This is something that works well with trailing stops such as the SuperTrend or the Chandelier Stop. Backtests will improve, if you do not use a hard stop, but wait that the stop is taken out by the close rather than intra-bar.

However, there is no point to wait until the bar close to take your profit. A profit target should always be set as a limit order which is triggered intra-bar.


Entry Orders:

Most indicators used by charting software are calculated from the bar close. Therefore all results that are shown on a historical chart rely on the bar close as input data for all chart indicators. In case you decide to enter intra-bar, your real-time performance will not be in line with the historical performance. This is particularly true, if you use market orders for entering your position.

However, this does not invalidate intra-bar entries in general. When trading breakouts, you may use a stop order to enter a position. When trading pullbacks you may use a limit order to enter a position. In both cases you would enter your positions intra-bar, when the stop order or the limit order has been hit. These entries are based on price action alone and there is no point to wait until the bar close.

In contrary, when your decision to enter a position depends on an indicator that generates a signal, you would rather wait until the bar close and then enter with a market order. Any indicator signal generated intra-bar may not persist and disappear when the bar closes. I would answer the question of entering intra-bar as

-> entries based on price action (limit or stop orders): should be generated intra-bar
-> entires based on indicator signals (market order): should be generated at the bar close


Backtesting:

I have done backtesting with NinjaTrader, and there are two main factors that will invalidate almost any back test

- intra-bar market orders
- renko bars

It is possible to overcome the first issue by adding a secondary bar series of 1-tick bars, while second issue can be fixed with special bar types such as Better Renko bars. Nevertheless, intra-bar market order are always a pain to deal with in a backtest, and I would refrain from using them. This is what is typically used for a backtest:

limit orders -> entry or exit at the limit price
stop orders -> entry or exit at the stop price plus/minus slippage
market orders -> entry or exit at the bar open plus/minus slippage

Based on these assumptions intra-bar market orders will harm any backtest - unless you complicate it with oversophistication and secondary bar series.


Summary:

Use market orders at the bar close, while limit and stop orders should be executed intra-bar. Market orders shall be used for indicator generated signals. Limit and stop orders are the tool of your choice when trading price action.

Reply With Quote
The following 12 users say Thank You to Fat Tails for this post:
 
(login for full post details)
  #6 (permalink)
Market Wizard
Chicago Illinois USA
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
 
wldman's Avatar
 
Posts: 3,341 since Aug 2011
Thanks: 1,978 given, 8,830 received

@Fat Tails

I love everything you post.

Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to wldman for this post:
 
(login for full post details)
  #7 (permalink)
Denver, Colorado, United States
 
 
Posts: 1 since Jun 2020
Thanks: 1 given, 0 received

This was immensely helpful, thank you FatTails.


Fat Tails View Post
When talking about generating intra-bar orders, it is important to distinguish

- between entry orders and exit orders
- between market orders, stop orders and limit orders
- between trading indicators signals and price action

Let us go through this step by step. I will start with exit orders.


Exit orders:

When you add a bracket to your existing position, you will typically add a profit target and a stop loss. The respective order types are a limit order and a stop order. These order types typically reside at the exchange and will be executed intra-bar. Why wouldn't you execute them intra-bar?

To avoid your stop from being triggered by stop hunters you may decide not to place a hard stop at the exchange but simulate the stop with a strategy which is running on your computer. In that case you may wait for a bar close beyond the stop value and then exit your position with a market order at the bar close.

This is something that works well with trailing stops such as the SuperTrend or the Chandelier Stop. Backtests will improve, if you do not use a hard stop, but wait that the stop is taken out by the close rather than intra-bar.

However, there is no point to wait until the bar close to take your profit. A profit target should always be set as a limit order which is triggered intra-bar.


Entry Orders:

Most indicators used by charting software are calculated from the bar close. Therefore all results that are shown on a historical chart rely on the bar close as input data for all chart indicators. In case you decide to enter intra-bar, your real-time performance will not be in line with the historical performance. This is particularly true, if you use market orders for entering your position.

However, this does not invalidate intra-bar entries in general. When trading breakouts, you may use a stop order to enter a position. When trading pullbacks you may use a limit order to enter a position. In both cases you would enter your positions intra-bar, when the stop order or the limit order has been hit. These entries are based on price action alone and there is no point to wait until the bar close.

In contrary, when your decision to enter a position depends on an indicator that generates a signal, you would rather wait until the bar close and then enter with a market order. Any indicator signal generated intra-bar may not persist and disappear when the bar closes. I would answer the question of entering intra-bar as

-> entries based on price action (limit or stop orders): should be generated intra-bar
-> entires based on indicator signals (market order): should be generated at the bar close


Backtesting:

I have done backtesting with NinjaTrader, and there are two main factors that will invalidate almost any back test

- intra-bar market orders
- renko bars

It is possible to overcome the first issue by adding a secondary bar series of 1-tick bars, while second issue can be fixed with special bar types such as Better Renko bars. Nevertheless, intra-bar market order are always a pain to deal with in a backtest, and I would refrain from using them. This is what is typically used for a backtest:

limit orders -> entry or exit at the limit price
stop orders -> entry or exit at the stop price plus/minus slippage
market orders -> entry or exit at the bar open plus/minus slippage

Based on these assumptions intra-bar market orders will harm any backtest - unless you complicate it with oversophistication and secondary bar series.


Summary:

Use market orders at the bar close, while limit and stop orders should be executed intra-bar. Market orders shall be used for indicator generated signals. Limit and stop orders are the tool of your choice when trading price action.


Reply With Quote


futures io Trading Community Traders Hideout > Intrabar order generation - not recommended, but why?


Last Updated on June 5, 2020


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

Journal Challenge w/Jigsaw

April
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts