Topic: Question about using "Bar Opening"...

I'm trying to better understand the pros / cons of using "Bar Opening" as an "Opening Point" and was curious to learn how others view its use.

If I understand correctly -- "Bar Opening" can be thought of just like any other indicator.  Its only requirement is there be a NewBar.  Since the opening logic conditions are AND'd then this means if the "Bar Opening" indicator (not really an indicator but sort of acts like one) returns 'false' (i.e. NOT a NewBar), then no further calculations occur.  So, if I am trading on an H4 chart that means I'll get a new OHLC bar once every 4 hours and, hence, my strategy is only capable of trading at 4-hour intervals.

On the other hand, if I do not use "Bar Opening" then my strategy can open a trade at any time.  Since I'm using an H4 chart the OHLC bar data get updated once every 4 hours -- but my strategy is capable of opening a trade at any time.  During this 4-hour interval the OHLC bar data remains the same, but the Bid and Ask prices do change.  So, if my strategy includes indicators that use Bid and Ask, then they are capable of creating signals at any time during this 4-hour interval.

So -- now I'm wondering why would I ever want to use "Bar Opening" since it would seem to make my strategy less sensitive to current market conditions.  Since opening and closing trades use the current Bid and Ask prices, then it seems like strategies that use "Bar Opening" put themselves at a disadvantage because they can't take advantage of continuously changing Bid and Ask prices when calculating signals.

Appreciate any thoughts, advice, suggestions...

Re: Question about using "Bar Opening"...

Hi sleytus,

In the end, to build a strategy one needs to check if some (trading/opening/closing) conditions (are met) at some time. You can either choose to be continuosly checking your conditions (every tick, every specific time -20 secs-, every bar in a lower timeframe, etc.) or you can just choose to check if your trading conditions are met only at a very concrete time, for example only at the beginning of a new bar (h4 for example).

As with everything in life each approach has its advantages and disadvantages. The advantages of only checking conditions at the bar opening are (in my humble opinion):

- A lot faster backtest, calculation, optimization, etc. (as you only have to check the conditions once, instead of hundreds, thousands of times).

- A specific and concrete moment to check indicators in a frozen time/moment. I mean, if we are waiting for a specific signal to happen, for example a moving average crossover, or an RSI going over a level, if we are continuously checking the condition (the crossover) this may happen many times in a very small period of time, because price may move high and low and this could give us many signals. So, trading only the bar opening could give us not very accurate signals but maybe more precise. It is a way to avoid false signals.

- Finally trading only the openings of the bars may give us more robust strategies, because some of the noise of the intra-bars is removed. Our strategy only takes into account the final state of the market at some point when the candle is finish and that moment may have more information -may be more stable/robust etc- than trading before the candle is over. For example, a bar closing over a resistance level, a band and so on is meaningful by its own.

On the contrary, it has its drwabacks, of course. These may be: less accurate signals, missing trade opportunities, being late in market, and so on.

In the end, it seems one must balance the advantages and disadvantages of this technique and choose how you will build your strategies. In my case, I'm pretty happy using opening bars, as the signals I use are good enough for me and I can test and optimize and check my strategies in MT4 a lot (a lot) more faster.

There is a middleway as others have stated in other posts. You can choose your trading timeframe to be a lower timeframe, for example 5 minutes or 1 minute or 15 minutes (this is the TF where conditions are checked at the beginning of those bars) but at the same time, taking into account a higher Timeframe (for example H4) as a context. This is the similar to saying: I build my strategies for H4, but check conditions in a lower timeframe (m5 or m15) etc. In this case, the strategy is checked every m5, so it is checked a lot more times than being checked every H4 (and for that resason, a lot slower backtests, but maybe more and more accurate signals)...

Hope this helps.
Best regards.

Re: Question about using "Bar Opening"...

For Daily and H4 timeframes using bar open/close strategies can be very toxic, because of midnight spread. Most brokers spikes spread tremendously around midnight, and guess when your D1/H4 bar open strategy enters? smile so you can get very laying back test, because FSB do not count for that spread spike. Some time ago found some unbelievable good strategy, however it was pure lie, it suffered from this, it traded that spread spike of the midnight with low take profit. So, keep in mind this if you find holy grail. Probably you want to check your broker midnight spread too and if your strategy does not trade it. Probably that spread spike is for a reason too, to take last pants off from not aware automated trades.

Re: Question about using "Bar Opening"...

rejectweb -- thank you for your wonderful and insightful response.  I learned a lot and it has helped me gain a better understanding.
Irmantas  -- thanks for your advice.  I often use the H4 timeframe and your experience is most valuable.

For sure -- everything is a trade-off.  There is no right or wrong answer and different types of strategies work better or worse depending on the current pattern of incoming data.

rejectweb -- I would like to add a bit more to a couple of points you make:
1. Faster backtesting -- yes, no question.  Being able to use 'Open prices' in MetaTrader's Strategy Tester is an advantage.  'Every tick' is useless because it takes forever.  'Control points' does work okay for those strategies that do not use 'Bar Opening', but it is slower than 'Open prices'.
   
2. More accurate signals -- this I'm not so sure about.  A signal that occurs at H4 is no more accurate than a signal that occurs 5 minutes earlier or 5 minutes later.  MetaTrader supports this concept of OHLC -- i.e. "bars" at certain timeframes.  The timeframes are arbitrary -- instead of M1, M5, etc they could be M1.274 or M17 or ???  When you select a timeframe, MT4 updates the OHLC bar data only once per timeframe.  For example, for H4, it will update the OHLC data at 1200 and then again at 1600.  But, during the interval between 1200 and 1600 the OHLC bar data remains the same.  So, if you are using 'Bar Opening' there is no need to check more frequently than once with each NewBar, since nothing changes between NewBars.  However, in addition to OHLC bar data there is also ASK and BID prices -- which do frequently change, usually with each OnTick.
   
As for superfluous signals that may occur if you check too often, I think this is remedied by using multiple indicators.  True, one indicator may be overly sensitive, but when multiple indicators are combined I think this becomes less of a problem.  According to Popov's rules, an open signal can only occur when ALL indicators are in agreement, which has the effect of filtering-out false signals.
   
I guess I'm not so concerned about getting into a trade as early as possible but, rather, hanging around too long after it's clear the trade is going to be a loser.  Suppose I open a trade at 1200 and by 1300 it's clear it is a loser.  If I'm using H4 with 'Bar Opening' and 'Bar Closing', then it means I have to hang around until 1600 for my closing logic to recognize things are bad (or, perhaps my SL kicked-in earlier).  On the other hand, if I check prices with each OnTick, then by 1301 my strategy has the opportunity to close the trade with minimal damage.  Remaining in a trade for 3 additional hours after my closing logic and indicators have recognized this as a loser, would seem to be undesirable.

I've also noticed if you let FSB-Pro just do its thing and randomly generate strategies then it rarely includes 'Bar Opening' and 'Bar Closing'.  And I wonder if that's because they often do not offer an improvement.  I don't know...  If I want strategies to use 'Bar Open' and 'Bar Closing' then I have to explicitly "link" them during the generation phase.  FSB-Pro and EA Studio use OHLC data sets and have no concept of ticks (except simulating them via interpolation) -- so, I'm not clear how FSB-Pro could favor strategies that don't use 'Bar Opening' and 'Bar Closing'.

I continue to use a mix of strategies both with / without 'Bar Opening'.  So -- I'm still wrestling with which way to go.  Again, I appreciate your thoughtful response.  It helps to provide a nice reference point as I think about this.

Regards,
Steve