Daily Vertical Lines in MT5

To add comments, please log in or register
bavarian919
37
bavarian919  
Hello altogether,

I used to trade via MT4 (that was a while back). Now I wanted to start trading again and installed the MT5 Software.

Back in my MT4 times I used this indicator --> https://www.mql5.com/de/code/12266 <-- to display certain times in my chart, which was (and hopefully will be again) a very useful tool for me.

However, this indicator is only available for MT4. Does anybody happen to know if there is way to make it MT5 applicable (unfortunately, I am not quite the coder)? Or does anybody use and recommend a different indicator, that can do the same ?


Thanks a lot in advance and have a great day.
Fernando Carreiro
4915
Fernando Carreiro  
bavarian919:  I used to trade via MT4 (that was a while back). Now I wanted to start trading again and installed the MT5 Software.

Back in my MT4 times I used this indicator --> https://www.mql5.com/de/code/12266 <-- to display certain times in my chart, which was (and hopefully will be again) a very useful tool for me.

However, this indicator is only available for MT4. Does anybody happen to know if there is way to make it MT5 applicable (unfortunately, I am not quite the coder)? Or does anybody use and recommend a different indicator, that can do the same ?

For what purpose did you use it? Was it perhaps used to mark the different sessions of the day (Asian, Europe, US, etc.)?

If so, then there should be several in the Codebase for marking the sessions, such as this one: https://www.mql5.com/en/code/16790

If that is not the case, and you can not find anything, then let me know via PM and I will convert it for you (no charge), but first see if you can find it.

Trading Sessions Open - Close
Trading Sessions Open - Close
  • www.mql5.com
This is a trading sessions indicator. There are orange — Asian, blue - European, and green — American sessions on the image. You can change colour scheme in the settings.
Stanislav Korotky
30853
Stanislav Korotky  
First thing to try - change this indicator's file extension from mq4 to mq5, place it in MQL5/Indicators folder and compile in MT5. Chances are that this specific indicator will fit MT5 without changes, or minimal changes.
Fernando Carreiro
4915
Fernando Carreiro  
Stanislav Korotky: First thing to try - change this indicator's file extension from mq4 to mq5, place it in MQL5/Indicators folder and compile in MT5. Chances are that this specific indicator will fit MT5 without changes, or minimal changes.

No, the code is too old and uses functions that are not compatible with MQL5. It needs to be redone. If the OP only uses it for Sessions then there are alternatives. If not, he has my offer to consider.

bavarian919
37
bavarian919  
Fernando Carreiro:

For what purpose did you use it? Was it perhaps used to mark the different sessions of the day (Asian, Europe, US, etc.)?

If so, then there should be several in the Codebase for marking the sessions, such as this one: https://www.mql5.com/en/code/16790

If that is not the case, and you can not find anything, then let me know via PM and I will convert it for you (no charge), but first see if you can find it.

Hi Fernando and thanks for your reply,

I used it to highlight certain time periods (which were enclosed by two vertical lines placed by the indicator), as I am doing all my research by hand and it helped emphasize the desired time periods during each session.
So unfortunately the proposed indicators which solely mark each session do not suffice to serve this purpose.

Hence, it would be amazing if you really could convert it - as long as it wouldn't take a lot of your time and you don't mind. 

Thanks a lot and greetings from Germany

Fernando Carreiro
4915
Fernando Carreiro  
bavarian919: I used it to highlight certain time periods (which were enclosed by two vertical lines placed by the indicator), as I am doing all my research by hand and it helped emphasize the desired time periods during each session.

So unfortunately the proposed indicators which solely mark each session do not suffice to serve this purpose.

Hence, it would be amazing if you really could convert it - as long as it wouldn't take a lot of your time and you don't mind. 

The original MQL4 code is very old and unstructured and requires that it be totally redone properly (which I will be doing over the weekend).

However, here is a very quick & dirty fix so that it will work on MQL5, despite the need for it to be refactored properly.

There could still be bugs, and the proper rewrite will be released later.

bavarian919
37
bavarian919  
Fernando Carreiro:

The original MQL4 code is very old and unstructured and requires that it be totally redone properly (which I will be doing over the weekend).

However, here is a very quick & dirty fix so that it will work on MQL5, despite the need for it to be refactored properly.

There could still be bugs, and the proper rewrite will be released later.

Hey Fernando, I just tried it out and it already works like a charm the way it is (no bugs encountered) - so there is no apparent need for you to waste your weekend.

Thanks a lot,mate!




Fernando Carreiro
4915
Fernando Carreiro  
bavarian919:

Hey Fernando, I just tried it out and it already works like a charm the way it is (no bugs encountered) - so there is no apparent need for you to waste your weekend.

Thanks a lot,mate!

You are welcome!

GBFX MQL5
489
GBFX MQL5  
Fernando Carreiro:

The original MQL4 code is very old and unstructured and requires that it be totally redone properly (which I will be doing over the weekend).

However, here is a very quick & dirty fix so that it will work on MQL5, despite the need for it to be refactored properly.

There could still be bugs, and the proper rewrite will be released later.

Hello sir,

I was looking for a Vertical Line indicator for MT5 and I saw the one you made for a member(quick & dirty fix).

While it is far better than any other one I saw during my search till date, I was hoping you could help with two issues I have with it.

1.      1.       It leaves a permanent time stamp at the bottom of each line.

2.      2.       It cannot be set it to display only on selected Time-frames from the “Visualization” settings. It forcefully displays on all timeframes.

I would be really glad if you could kindly help with these issues.

 

Thanks.

neil324
20
neil324  
GBFX MQL5:

Hello sir,

I was looking for a Vertical Line indicator for MT5 and I saw the one you made for a member(quick & dirty fix).

While it is far better than any other one I saw during my search till date, I was hoping you could help with two issues I have with it.

1.      1.       It leaves a permanent time stamp at the bottom of each line.

2.      2.       It cannot be set it to display only on selected Time-frames from the “Visualization” settings. It forcefully displays on all timeframes.

I would be really glad if you could kindly help with these issues.

 

Thanks.

Updated the indicator and set lines to background removing the time stamp. This can be changed back in the indicator inputs 'Line 1 Background' true/false.

Can't change the visibility, maybe someone else can help. I thought visibility was always changeable in the visualization inputs, unless a 'Object Set Integer' flag was added to the indicator code, I would be interested in the solution for this for the future.

Files:
GBFX MQL5
489
GBFX MQL5  
neil324:

Updated the indicator and set lines to background removing the time stamp. This can be changed back in the indicator inputs 'Line 1 Background' true/false.

Can't change the visibility, maybe someone else can help. I thought visibility was always changeable in the visualization inputs, unless a 'Object Set Integer' flag was added to the indicator code, I would be interested in the solution for this for the future.

Just seeing this.

Thanks for tackling one out of two.

Could you point out exactly where in the code you changed so I could in future do same for other indicators.

I will let you know when I get a solution to the visibility issues.

Thanks again.

12
To add comments, please log in or register