Markets open indicator adjustment...

virtuado

Master Trader
Aug 5, 2016
56
9
49
Hi,

I am using this indicator because i like it, there are more, one thing they have in common is that the opening times in the input section only are accepted in full hours.
But NY opening is 14.30(local time), so the opening line on the charts is not correct.

If somebody would be so kind to change this, this would be helpful.

If it's not to much work and effort it would also be nice if there could be added an option to unmark the close lines, since i am only interested in the opening.
 

Attachments

Enivid

Administrator
Staff member
Nov 30, 2008
12,425
494
114
Odessa
www.earnforex.com
I have added sessions' open minutes as parameters. Close lines can now be turned off via input parameters.

In addition, I have made these changes:
  • You can now modify the style, width, and color for open, close, and advance notice lines.
  • Label font size and font face can also be changed via input parameters.
  • The indicator will not initialize if timeframe > H1 or if some session time is invalid.
  • Optimized creation an deletion of objects.
  • Line labels should have better visibility now.
Some crazy screenshot:
Market Open Lines.png
 

Attachments

  • Like
Reactions: virtuado

virtuado

Master Trader
Aug 5, 2016
56
9
49
Enivid, is is technically possible to adjust the indicator opening times automatic when Daylight saving changes in the different timezones?
This would be very handy.

I tried this: http://www.tradingsystemforex.com/mql-programming/2086-automatic-gmt-offset.html >> #6
After compiling i did get 1 error(override system function) and several time conversion warnings.

But i honestly don't know if this is the action to perform, so can you take a look at it pls?
 

Attachments

Enivid

Administrator
Staff member
Nov 30, 2008
12,425
494
114
Odessa
www.earnforex.com
As far as I can see, that code is useful only for determining the difference between server time and GMT. Determining if DST is on for different trading sessions is impossible from within the MT4 indicator.
 

virtuado

Master Trader
Aug 5, 2016
56
9
49
Enivid, could you please take a look at this?

The London session shows suddenly only 1 time per week?

So i did compile and it gives some faults: posssible loss of data due to type conversion?
Can this be the cause?

I did only add the open lines from NY and London for better view.
 

Attachments

virtuado

Master Trader
Aug 5, 2016
56
9
49
Hmmm...to be honest, i don't know what happened, but now it's working like it should again. London session is showing how it should...???

But the compiling faults are still there, so maybe you could take a look anyway?
 

virtuado

Master Trader
Aug 5, 2016
56
9
49
I have to ask you again if you can take a look at it, because this morning when starting up my system the same thing happened again with the London sessions?

I also did notice that when i switched from m15/m30 to h1 chart all NY sessions dissapear?

So i guess there is something not going how it should be...
The journal doesn't give any additional info regarding errors.

I have also another question. In these 2 lines(100 and 101), what does 3600 represent?
datetime dtGmtFromLocal = TimeLocal() - TimeZoneLocal()*3600;
datetime dtGmtFromServer = TimeCurrent() - TimeZoneServer()*3600;
 

Attachments

Last edited:

virtuado

Master Trader
Aug 5, 2016
56
9
49
Thanks for clarifying that.

You also can take a look at what goes on with the issue i mentioned above?