Topic: Experimenting with Close at Bar Open

Dear Traders,

I always work on making more reliable and safe strategy model. As a result we have one of the best tools in the industry. But we want even more, for example, point to point correspondence of the backtest results of our tools with other popular platforms.

One old idea is to close the positions at the next Bar Open instead of the current close. In the reality the difference is very small - only one tick. The design of the most popular platform makes the detection of Bar Open a piece of cake, but on the other hand, these platforms are almost incapable of working with Bar Close.   

To solve that mystery, I intend to create a strategy structure and a proper Generator for trading only on Bar Open. I'll use EA Studio for the prototype base and because I already have the main idea, I think we will have results before the end of June.

I want to be able to provide strategies for comparing both models and to draw the direction of the future developments.

Please share your ideas,

Trade Safe.

Re: Experimenting with Close at Bar Open

The journal can be one means of comparison as it lists each entry.

We may have to export to csv to get each item lined up.

I am not sure if you can set up to export Account Statistics for a comparison.

This two should provide most of what would be needed to make a detailed comparison. (I think)

I am looking at 'Statistics', that may be better for comparison than 'Account Statistics' because it separates Long and Short. more details.

I actually have not thought much about entries on Open or Close but I will be willing to test the idea thoroughly. I think we may have to use several types of indicators and combinations to get an accurate picture.


Hopefully others will contribute to this thread.

daveM

My 'secret' goal is to push EA Studio until I can net 3000 pips per day....

Re: Experimenting with Close at Bar Open

I can make the app exporting stats in csv files for excel. It can export the whole journal.

What do you think is useful for export and in what format?

Re: Experimenting with Close at Bar Open

I have exported the journal more than a few times.

To make comparisons...... I suggest the Statistics, in such a way that the details can be viewed side by side, I am not sure how to describe that......

I am pretty sure that the statistics will point out significant differences immediately and then perhaps refer to the journal to see exactly what is different.

If there is a variation of, say, less than 5 per cent, I would think not much sense looking further...

Sometimes we can get too fussy and end up wasting a lot of time.

Another way of doing this  would be to have FSBpro retain the statistics and then issue a variance report after the second run.... and from that we can decide as to whether to export the information.

I am pretty sure you have started to look already at the results of the two methods and have a good idea.

My 'secret' goal is to push EA Studio until I can net 3000 pips per day....

Re: Experimenting with Close at Bar Open

I am pretty sure you have started to look already at the results of the two methods and have a good idea.

Not yet smile

I just figured out the core concept (at 2:00 AM)

void OnNewBar() {
  if (isPosition) 
    CheckStopLossTakeProfit();
  
  if (isPosition)
    SetRollOver();

  if (isPosition) {
    CalculateCloseConditions();
    if (isCloseSignal)
        ClosePosition();
  }
  
  if (!isPosition) {
    CalculateOpenConditions();
    if (isOpenSignal)
        OpenPosition();
  }
}

A side effect can be that the EA will be much faster on the MT Tester. It can be even faster than the usual MT Experts.
This is possible because the indicators will be calculated only at a new bar (only if there is / there is not position) vs at every tick as usual.

Re: Experimenting with Close at Bar Open

Interesting that MT4 builds bars based on the clock, a bar may have no activity but it is printed anyways.... That would seem to render our strategies to be somewhat inaccurate on the lower time frames ie 5 minute and one minute.

My 'secret' goal is to push EA Studio until I can net 3000 pips per day....

Re: Experimenting with Close at Bar Open

Interesting that MT4 builds bars based on the clock

This is not true. MT builds bars only on tick. If there is no ticks, MT doesn't plot bars.

We cannot decide preliminary when to trade. The strategy has the full control on the signals. An Entry Time or ATR indicator can perfectly filter such entries.

Re: Experimenting with Close at Bar Open

I have the first results. As I expected the only difference in our backtest is the charged swap when a position is transferred overnight.

Close at Bar Close
http://s32.postimg.org/n7ic9yvr9/screenshot_1790.png
http://s32.postimg.org/fst0hl9vp/screenshot_1791.png


Close at next Bar Open
http://s32.postimg.org/w198r2ipx/screenshot_1789.png
http://s32.postimg.org/cn8erdr9h/screenshot_1792.png

It is more interesting what will happen in MetaTrader, which is the main purpose of the experiment.

Re: Experimenting with Close at Bar Open

This model required a major redesign of the backtester and the indicators that plots on the main chart.
I decided to test the output in cAlgo.

Here is a prototype demo.

http://forexsb.com/video/Bot-Factory.mp4

Re: Experimenting with Close at Bar Open

Next weapon in the arsenal is called Bot Factory. It will export bots for cAlgo.

I'm testing the close at next Bar Open model. It works fine so far.

If you ask, why it is a separate program, the answer is that this model is incompatible with FSB and EA Studio. I rewrote 90% of the JavaScript and C# indicators in order to make this working fine.

Fortunately, the result is good, the speed of the app is tremendous. Also cAlgo tests the exported robots as fast as it test the native ones.

http://s32.postimg.org/md8ai4285/calgo.png

11 (edited by yonkuro 2016-07-22 00:49:58)

Re: Experimenting with Close at Bar Open

Popov wrote:

Dear Traders,

I always work on making more reliable and safe strategy model. As a result we have one of the best tools in the industry. But we want even more, for example, point to point correspondence of the backtest results of our tools with other popular platforms.

One old idea is to close the positions at the next Bar Open instead of the current close. In the reality the difference is very small - only one tick. The design of the most popular platform makes the detection of Bar Open a piece of cake, but on the other hand, these platforms are almost incapable of working with Bar Close.   

To solve that mystery, I intend to create a strategy structure and a proper Generator for trading only on Bar Open. I'll use EA Studio for the prototype base and because I already have the main idea, I think we will have results before the end of June.

I want to be able to provide strategies for comparing both models and to draw the direction of the future developments.

Please share your ideas,

Trade Safe.

Hi Popov, how is the development going? Will it be implemented to ForexSB pro?

I’m working on improving my English and trading skill

Re: Experimenting with Close at Bar Open

Hi Popov, how is the development going?

I'm working hard and the results are promising. I'll show a prototype in two days.

Will it be implemented to ForexSB pro?

With this model it becomes a different program and also the exported Expert Advisors will have a different structure. I'll keep them separated as FSB Pro and EA Studio. However, the EA Studio is included in the FSB Pro purchase so the answer to your question is virtually Yes.