Same indicator, different settings and time frames

 

Hi All,

New to this forum and still relatively new for mt4.

I want to use the same indicator file in 3 different sub-windows, one for RSI, and the other two for PRI, with different settings. The issue is that for some time frames (usually the longer ones, like D1 and W1) they start interfering with each other and become difficult to use. I am attaching a snapshot of a weekly and a H4 charts as an illustration. The H4 prints correctly while the W1 does not (unusable).

This is how it should NOT look like


This is how it should look like


I saw a couple of discussions on this topic and already made changes to the ObjectCreate line in the files (before that they did not want to print at all…). I attach the 3 files of this indicator, the main difference between them being the objectcreate line. I am sure some other lines need to be changed but, unfortunately, my coding experience and knowledge is still close to 0 and do not know how to do it.

I will appreciate if anybody can help me change the coding so that these 3 files print correctly in any time frame.

Thanks a lot in advance.


PS. The solution could be similar to this here but I do not know how to implement it... :-(

Files:
RSI.7.mq4  22 kb
PRI.7.mq4  22 kb
PRI.3.mq4  22 kb
 
.
Files:
 
pipPod:
.
Thank you so so much pipPod for this fast responce. It does seem to work very well now. You seemed to have changed quite a bit the code... more lines than I originally thought... Now all timeframes seem to print correctly. Thanks again!!
 
rosspet6:
Thank you so so much pipPod for this fast responce. It does seem to work very well now. You seemed to have changed quite a bit the code... more lines than I originally thought... Now all timeframes seem to print correctly. Thanks again!!
You're welcome. Yes also made it possible to use a lower time frame than the chart's.
 
You are a genius. all indicators are of  yours are good.
Reason: