Topic: Closing at Open vs closing at Close

Dear traders,

We found a bug in the MT backtester several months ago. The bug is that when MT tester interpolates bars in the so called “Every tick” method, it doesn’t actually do this correctly. It misses to emit tick near to the end of a bar. As a result of the bug a strategy that should close a position at Bar Closing closes it at the next Open.

http://s7.postimg.org/3qsq0sm9n/screenshot_1393.png

This bug appears only in the “Every tick” mode. If we use “Control points” the MT works fine by closing the positions at the end of the same bar:

http://s7.postimg.org/69ef1h7zv/screenshot_1394.png

I know you – the experienced traders in this community do not care of the MT tests, but many traders swear by the MT tester. I am afraid that every time when there is a difference between MT tests and FSB tests the majority of the traders take the MT side. They also don’t believe that there is a bug in the tester and fully trust the MT’s ambiguous “tick” tester.

What can we do in that case?

1. To continue this unequal and doomed fight for the truth.
2. To change our model and to start closing positions at the next bar opening.

How we can change to closing at open price:

1. The change will affect only the closing logic conditions of FSB.
2. The Closing Logic Conditions indicators will use UPBV (“Use Previous Bar Value”) option on when the indicator is based on price different than Open (the majority of the indicators).
3. If we have closing at the end of the day on Friday, it may happen at Bar Closing.

Other considerations:

Our current EAs close at a predefined number of seconds before the expected bar Close. The default number is 15 seconds, but it is adjustable from the EAs Input screen in MT. This also adds some deviation from an eventual backtest on the new data. By closing at Bar Opening we will have an exact match between the real trade and the backtest.

I need your advice for that question – is it deserve the time and effort to develop a concept proof model that will close positions at next Bar Opening?

Trade Safe!

Re: Closing at Open vs closing at Close

Would it be like a new option or a completely new closing system?

Re: Closing at Open vs closing at Close

It looks like it can be easily implemented by only allowing "Bar Open" as a closing point. It is not as simple as that, but the backtesting model is "clever" enough to automate most of the work.

I don't remember exactly why  I removed "Bar Opening" as a closing point 10 years ago. It was some reason, but it must be nothing serious for FSB Pro to deal with.

A have also another reason for that move - implementing a MT native experts design for some strategies. It means that the experts can be made MTish with using it's original indicators. The included in MT indicators are written in C++ and are highly optimized. Such expert will be much faster than ours now and much shorter. It is also possible some MT nerds to actually start liking it, which will be a huge advantage compering with our current expert that has the FSB core integrated inside.

Re: Closing at Open vs closing at Close

My thinking - current close (at bar closing) should remain available. To have a new option in addition (bar opening) can be welcomed if it doesn't take much effort to implement. If there are next-step upsides involved like shorter code and obvious speed advantage, then the answer is go-go-go! In my opinion this shouldn't be done just for the sake of adapting to MT's test results, those who know a few things appreciate the principal division between FSB and MT.

Re: Closing at Open vs closing at Close

I'm not a programmer so nothing to comment on from a programmer perspective.

But as a customer, I think we need to make decision based on what you (Popov/Footon/FSB's developers) think is the best method of calculation that give the FSB's result it's "integrity" and therefore gives users' the confidence to trust FSB's results.  Which method produce reliable results should be our key decision criteria.

As for the possibilities that traders may bring out the "discrepancies" and doubt FSB's results...then I think this discussion thread would be helpful to keep users/traders informed (and make it sticky).  Maybe this thread could be titled as "Why FSB's back testing may differ from MT back testing"  It's looks better on FSB to have warn users of the difference than to later bring this information out whenever someone question about the discrepancies and other's may then see it as a lame excuse or defensive behaviour.  But if we put this information in the fore front.  Users are kept informed and aware of the discrepancies, such actions may encourage trust and openness. What do you think?

Why there is discrepancies in MT and FSB back testing?

1. Bug issue that affected the point of closing

2. FSB's default 15sec closing before bar closing

Hannah

Re: Closing at Open vs closing at Close

I'm sure our model is correct. Probably will have to stand to it and to not deviate because of a MT bug.

Also we know that we use these 15 seconds close advance also because of a MT inconsistency:
- MT doesn't have idea what is Bar Closing.
- It announces Close price even from the first Open tick of a new bar.
- If ticks are not coming, it freezes instead of opening a new bar with OHLC equal to the last tick.

Having that in mind i have to probably rename EA studio to FSB Light or FSB Air and to keep it representing the FSB model.

I have to concentrate on the Dynamic Protections, adding new features to FSB Pro and fixing issues instead of trying to imitate the broken model of MT.

Re: Closing at Open vs closing at Close

Yeah, focus on our FSB strengths so that by the time the new features hit the market, it will push FSB several notch up and leave MT far behind

How about EA BUILDER - FSB LITE as most apps use lite as a mini version So that those haven't heard about FSB would at least by the name EA Builder guess it's function or product?

Hannah

8 (edited by GD 2016-02-23 21:06:13)

Re: Closing at Open vs closing at Close

What about the gaps?
What will happen if we use delay 0 sec against 15 sec?
What will be Close price?

Re: Closing at Open vs closing at Close

The EA acts only on a tick. When a tick comes the EA calculates the bar closing time and if the tick is at the zone "close - advance" it will send a close signal. If there are no ticks, it will miss the close at the time when we expected the bar to close. However, our expert detects such cases and will execute a close signal at the next tick (it will be actually next bar Open).
Even in a case if we have entry at bar Open, the EA will close first the position and will rise an entry signal when the close is confirmed. Our expert thinks for everything smile

So, to your questions:
What about the gaps? - if the close is not executed properly on the previous Close, it will be executed at the Open and a Gap will affect the position.
What will happen if we use delay 0 sec against 15 sec? - close at next Open.
What will be Close price? - MT has a Close price from the first tick. We don't believe it. I call such price "Current". A Current price becomes a Close price when the bar actually closes. We don't know the Close price before the server time becomes equal to "Bar Open Time" + "Time Frame in minutes".

10 (edited by GD 2016-02-23 23:11:12)

Re: Closing at Open vs closing at Close

1> What will happen if we have more than one ticks in the 15 seconds period?
2> if we use 0 against 15 seconds then we have better coincidence with MT?
     Is it same for Mt4 and MT5?
3> If yes then do you need to change Closing bar from previous bar to opening as you suggest?


PLUS ONE

In Closing conditions of FSB, why you do not permit GROUP A and GROUP B use for protections indicators like Pivots or Bollinger?
OR you permit but I do not Know to write them etc?

This way everything in your writing of protection indicators can be faster as each Group will correspond to OR condition.

==============

A possible algorithm >>>   GROUPA OR GROUPB OR GROUPC  (Three indicators which belong to different Groups for exit)

Re: Closing at Open vs closing at Close

1> What will happen if we have more than one ticks in the 15 seconds period?
The EA marks these ticks as AfterClose ticks. If there is such tick, the EA will check if the last close signal is successfully executed. If not the EA will resend the close order. The EA will not open a new position at an AfterClose tick.

2> if we use 0 against 15 seconds then we have better coincidence with MT?
     Is it same for Mt4 and MT5?
Yes, both EA4 and EA5 works at the exactly same way.

3> If yes then do you need to change Closing bar from previous bar to opening as you suggest?
We, the FSB users do not have to change it. I'm confident that if I open a position at midday and want to close it at midnight, I have to use the Close price of the last bar of the day. So my position will close at the first tick after 23:59:45 (the 15 seconds time advance is adjustable). I'm sure I don't want to close the position at the first tick on the next day. It will completely change my view. However, the millions of MT traders don't have a concept of closing at bar Close. I invented this technique 10 years ago and it was discussed in the MQL community, but not influence so far. The problem is that MT is completely broken when we speak for Close price, which we all agree is the most important one.

Re: Closing at Open vs closing at Close

Genius is always ahead of time...yet they are, at times ridiculed in the present.

When time catches up...the rest realised what they missed the point.

Popov, FSB is way ahead of time...one day the traders in the Forex community will catch up to your vision...and by then FSB is a household name for every traders.

Keep it up...we stand by you and we believe in your Vision!!!

Hannah

Re: Closing at Open vs closing at Close

I think I figured out how to "simulate" MT way of work of our expert in order to hide the true nature of it's model and to looks like it is an ordinary EA. I'll make experiments and will post a EA code for testing in several days.

Re: Closing at Open vs closing at Close

What I may do:
- automated "Bar close advance" time and removing the option from the EA. It may detect the average time between the ticks and to adjust the close advance automatically in the range of 5 - 30 seconds.
- automated Friday evening close hour. The EA may find the Friday close hour from the previous week close and to add automatically Day Closing 2, Bar Closing 2 indicators instead of the ordinary indicators if it is necessary.
- Optimization of the EA calculations. I think I can greatly improve the MT tester calculations of our EAs.

15 (edited by GD 2016-02-25 14:30:18)

Re: Closing at Open vs closing at Close

In my opinion, it is better to use Bar Opening and Bar Opening indicators
PLUS protection with GROUP A (OR) GROUP B during the bar is open for closing the trade.
it is not good to exit using i.e. only Pivot as it is now. You need absolutely and other possibilities using an OR logic i.e.
Pivot or parabolic SAR or other customized indicators.

What there is against of that?

I do not agreed with your selection but you know better.

Re: Closing at Open vs closing at Close

I may introduce an indicator "Next Bar Opening", which can be used only as a closing point.

PLUS protection with GROUP A (OR) GROUP B during the bar is open for closing the trade.

You can use logical groups with the closing filters as you wish. The groups are named with lowercase letters a, b, c, ...

By default every closing logic slot comes with a new group (OR relevance). If you put equal groups, you will have AND relevance.

http://s7.postimg.org/5ljcnrdfb/screenshot_1408.jpg

Re: Closing at Open vs closing at Close

I may introduce an indicator "Next Bar Opening", which can be used only as a closing point.

It sounds simple but it is not like as to add only a custom indicator. The current backtester covers 9 different scenarios of entries and exits. It looks like I'll have to add at least three more scenarios:
- Open at bar Open -> Close at Next Open  (here also check for new opening at bar open immediately  after a successful close)
- Open at some indicator value inside a bar ->  Close at Next Open
- Open at previous Bar Closing -> Close at Next Open
Every case uses different logic for setting UPBV in order to ensure safe backtest.

My concern is:
- how to deal with Day / Bar closing at Friday evening
- how to deal with Week Closing
It looks like these exits are contradictory to the close at Next Open because the event happens at Bar Close.

An eventual solution is the use of the Dynamic Protections I 'm developing now. I'm planning (but not yet implementing) additional closing conditions beyond the closing Point of The position. These conditions may be:
- Close at the End of Week
- Close at Midnight
- Close at Minimum Account
- Close at Max Consecutive Losses

A proper implementation of such rules may solve many problems.

18 (edited by GD 2016-02-25 17:12:01)

Re: Closing at Open vs closing at Close

- Open at bar Open -> Close at Next Open IF (here also check for new opening at bar open immediately  after a successful close)
- Open at some indicator value inside a bar ->  Close at Next Open IF
- Open at previous Bar Closing -> Close at Next Open IF

This solution sounds fine to me.

=========================

It Could be also a Logic Close Now IF Which will be relative to prices

Here you can include Minimum Account, stop Loss, Take Profit, Max. Consecutive Losses, Groups of indicators which their critical value can be calculated from previous Bars OPEN including Last Bar OPEN  (i.e. pivot+ Stochastic as Group a with TF), ( Bollinger + X as group B with TF) etc.

==============================


For the rest give me some time to think. For the above I am sure.


You have some protection scheme relative to prices.

19 (edited by GD 2016-02-25 17:34:36)

Re: Closing at Open vs closing at Close

///////////////////////////////////////////////////////////////////////////

- Open at bar Open -> Close at Next Open IF (here also check for new opening at bar open immediately  after a successful close)
- Open at some indicator value inside a bar ->  Close at Next Open IF
- Open at previous Bar Closing -> Close at Next Open IF

This solution sounds fine to me.

///////////////////////////////////////////////////////////////////////////

It Could be also exist a Logic Close Now IF Which will be relative to prices and TIME

Here you can include Minimum Account, Stop Loss, Take Profit, Max. Consecutive Losses, Groups of indicators which their critical value can be calculated from previous Bars OPEN including Last Bar OPEN  (i.e. pivot+ Stochastic as Group a with TF), ( Bollinger + X as group B with TF), Close at Midnight IF (some time in minutes advanced has to be given by the user) , Close at WeekClosing IF (some time in minutes advanced has to be given by the user)  etc.

///////////////////////////////////////////////////////////////////////////

In this frame you do not need previous Bar Closing indicator etc. Everything will be more simple and very fast

TOTALLY 7.

It is a lot of job but I believe after that the game is over... Of course you know better.