1 (edited by Hannes 2016-12-19 20:54:57)

Topic: The "Week Closing" closes my orders at the end of the hour

There's another major problem.

The "Week Closing" closing point closes my orders at the end of the hour somehow (although I tested an older version on a demo account and it worked fine as far as I remember).

Here are the orders in MT4:

https://i.imgur.com/689t1qd.png.png

Post's attachments

eurusd_m15_bollinger.mq4 278.31 kb, 6 downloads since 2016-12-19 

You don't have the permssions to download the attachments of this post.

Re: The "Week Closing" closes my orders at the end of the hour

Please be sure that your trading session closes at 24:00 on Friday. If not, you should use "Week Closing 2" indicator and to set a proper Friday closing time.

For example, if the broker closes at 22:00 (which is my case), the Week Closing 2 time must be 21:59 or earlier.

These indicators are not changed recently and should work. However, MT4 has a bug and it's strategy tester doesn't produce ticks near to the end of a bar, which can causes problems with the testing. The Control Point method worked better than the Tick method when I wast tested it.

I'll check what is the situation with the newest MT4 release. The MetaQuotes behavior is unpredictable and we never know how they will surprise us next week.

Re: The "Week Closing" closes my orders at the end of the hour

Unfortunately that's not my problem. It's not that the order don't close at friday. They close at the end of the hour they were opened each time. So they are never open for more than an hour. This can be seen in the orders on the screenshot.

Re: The "Week Closing" closes my orders at the end of the hour

Perhaps you will be able to redo the strategy in FSBPro and make adjustments so that the closings are as you want.

That will help you to learn part of the software and perhaps make a better strategy than what you have started with.

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

Re: The "Week Closing" closes my orders at the end of the hour

There is definitely something wrong, but I still  cannot figure it out.

I'm trying to debug Week Closing now on MT5, because it provides better tooling for that.

The problem I experience is that I cannot make it closing at all.

..
Returning to your screenshot, I don't see how it close "every hour". There is only one close on the screenshot at 16:18:11. It doesn't look like it is because of the Week Closing indicator.
I run your strategy on several terminals, however the only behavior I experienced is that the expert opens a position and never closes.

I'll fix first the Week Closing indicator and will check the other similar indicator. Then will return to your case. If you can make more tests and post details, it will speed the debug process.

..

By the way I found a very stupid or even idiotic bug in the MT5 trading code that causes re-quote errors.
I'll try to fix these issues as soon as possible.

Trade Safe!

6 (edited by Hannes 2016-12-22 16:51:04)

Re: The "Week Closing" closes my orders at the end of the hour

Popov wrote:

Returning to your screenshot, I don't see how it close "every hour". There is only one close on the screenshot at 16:18:11. It doesn't look like it is because of the Week Closing indicator.
I run your strategy on several terminals, however the only behavior I experienced is that the expert opens a position and never closes.

Yeah, now I remember, it didn't close the orders at all. But, as I said, on a real account with live trading, it closes the orders at the end of the hour.

The screenshot is from the history tab. Those orders are all closed.

1. Order: Open 2:18:52, Close 2:59:47
2. Order: Open 5:00:45, Close 6:00:00
3. Order: Open 8:09:18, Close 9:00:00
4. Order etc.

As can been seen, the orders close either exactly at the end of the hour or ~15 seconds before the close of the hour. Am I missing something here?

Re: The "Week Closing" closes my orders at the end of the hour

I do not think you are missing anything....... perhaps you can fiddle with the logic to get the trades you want...

Change the logic, use different criteria...

I recall that there are a few indicators to that strategy, you may want to investigate how prone it is to curve fitting, you may be spending a lot of time that will not be productive.

IMHO

There are so many oscillators in that strategy that it will be almost impossible to track what is happening. (referring to Maximillion Usd)

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

Re: The "Week Closing" closes my orders at the end of the hour

There is a huge problem with the quality of the MetaTrader programming API.
I spend several hours in the MQL forums trying to explain the problems with one of their "Time" functions. As I expected, it was pointless. They decided that MT works wonderfully and there are no bugs.

Fortunately, I found a workaround to the problem and will post an update to the Week Closing indicator tomorrow.

This is not solution to the reported issue. I'm not able to reproduce it.

Anyway, the "Array out of range" error is covered. The Week Closing is not related to that. I'll separate these post in a separate thread later.

Trade Safe.

9 (edited by Hannes 2016-12-22 19:11:08)

Re: The "Week Closing" closes my orders at the end of the hour

Popov wrote:

There is a huge problem with the quality of the MetaTrader programming API.
I spend several hours in the MQL forums trying to explain the problems with one of their "Time" functions. As I expected, it was pointless. They decided that MT works wonderfully and there are no bugs.

That sucks. Know that your efforts are appreciated. Anyways, looking forward to the update. And maybe the workaround will fix the end-of-hour-close problem too.


Blaiserboy wrote:

I do not think you are missing anything....... perhaps you can fiddle with the logic to get the trades you want...

Change the logic, use different criteria...

I recall that there are a few indicators to that strategy, you may want to investigate how prone it is to curve fitting, you may be spending a lot of time that will not be productive.

IMHO

There are so many oscillators in that strategy that it will be almost impossible to track what is happening. (referring to Maximillion Usd)

The strategy in question is not the MaxMillionEURUSD. And yeah, I'm very aware of curve fitting, but it has been performing wonderfully for 6 months OOS so far (MaxMillion). And I don't necessarily need to "track" what is happening in the sense that I need to know the states of all the indicators. The big picture (the overall statistics) is what I'm interested in. And if a strategy with many indicators proves not to be curve fitted, I'll still employ it regardless.

Re: The "Week Closing" closes my orders at the end of the hour

Hannes,

Please restart FSB Pro and wait for the MQL code update to v42. Re-export your expert advisor and test it with the MetaTrader tester.

Please report if the problem still persists.