(Req) 2 ma crossover histogram indicator - page 2

To add comments, please log in or register
Mladen Rakic
194488
Mladen Rakic  
anton1:
mrtools,

Yes, I have done.

And I set the time-frame at "60", and I put this indi at chart (M15). Because I want to see this indi (of Time-frame 60) at M15 chart. I am trading at M15 chart. And want to see the trend at H1.

Please make one mql4 version as an example.

Thank you and regards,

anton

anton

I am mladen mrtools is probably still in bed since it is now 6am there where he lives

In the indicator from this thread, if you try to hide the TimeFrame parameter it will not work. TimeFrame parameter is used to internally "communicate" with the target time frame and if the parameter is hidden, the indicator will not work at all. So it depends on the indicator and how it works if you can do that (parameter hiding) or not

mql5saja
520
mql5saja  

Hi mladen,

I have try this way:

extern string TimeFrame = "Current time frame";

int FastMa = 5;

int FastMaMethod = MODE_EMA;

int FastMaPrice = PRICE_CLOSE;

int SlowMa = 13;

int SlowMaMethod = MODE_EMA;

int SlowMaPrice = PRICE_CLOSE;

and I put it at M15, it works. BUT when I change the "current time frame" TO "60", it does not work. The MT4 is not responding.

Please help me.

Thank you and regards,

anton

Mladen Rakic
194488
Mladen Rakic  
anton1:
Hi mladen,

I have try this way:

extern string TimeFrame = "Current time frame";

int FastMa = 5;

int FastMaMethod = MODE_EMA;

int FastMaPrice = PRICE_CLOSE;

int SlowMa = 13;

int SlowMaMethod = MODE_EMA;

int SlowMaPrice = PRICE_CLOSE;

and I put it at M15, it works. BUT when I change the "current time frame" TO "60", it does not work. The MT4 is not responding.

Please help me.

Thank you and regards,

anton

anton

Check how it is called with iCustom() when you switch it to multi time frame mode (and what parameters are passed to it). That is why it does not work when you try to use other time frame than the current one. That would require a rewrite of the indicator and the question was how to hide the parameters (which, frankly I do not see any purpose to do since that way you are only limiting the users in the ways how the user can use that indicator)

regards

mql5saja
520
mql5saja  

hi mladen,

I do not hide the time frame, I JUST hide the MA. I am keeping the time-frame as EXTERN.

extern string TimeFrame = "Current time frame";

int FastMa = 5;

int FastMaMethod = MODE_EMA;

int FastMaPrice = PRICE_CLOSE;

int SlowMa = 13;

int SlowMaMethod = MODE_EMA;

int SlowMaPrice = PRICE_CLOSE;

thank you & regards,

anton

Mladen Rakic
194488
Mladen Rakic  
anton1:
hi mladen,

I do not hide the time frame, I JUST hide the MA. I am keeping the time-frame as EXTERN.

extern string TimeFrame = "Current time frame";

int FastMa = 5;

int FastMaMethod = MODE_EMA;

int FastMaPrice = PRICE_CLOSE;

int SlowMa = 13;

int SlowMaMethod = MODE_EMA;

int SlowMaPrice = PRICE_CLOSE;

thank you & regards,

anton

Find the line that goes like this :

trend = iCustom(NULL,timeFrame,indicatorFileName,"calculateValue",FastMa,FastMaMethod,FastMaPrice,SlowMa,SlowMaMethod,SlowMaPrice,2,y);

[/PHP]

and change it to this :

[PHP] trend = iCustom(NULL,timeFrame,indicatorFileName,"calculateValue",2,y);

all the best

mql5saja
520
mql5saja  

Hi mladen,

Would you please to make me this kind of indi that I need. As I said before, I am learning to code an indi. I still can not solve this problem.

Please help me.

Thank you and regards,

anton

Mladen Rakic
194488
Mladen Rakic  
anton1:
Hi mladen,

Would you please to make me this kind of indi that I need. As I said before, I am learning to code an indi. I still can not solve this problem.

Please help me.

Thank you and regards,

anton

here you go

regards

mql5saja
520
mql5saja  

mladen,

GREAT! It works. thank you very much.

BTW, where are you staying? I want to learn coding mql4. Would you please to recommend a good teacher?

Thank you and Best regards,

anton

Mladen Rakic
194488
Mladen Rakic  
anton1:
mladen,

GREAT! It works. thank you very much.

BTW, where are you staying? I want to learn coding mql4. Would you please to recommend a good teacher?

Thank you and Best regards,

anton

You can start the mql learning using the links from this post : https://www.mql5.com/en/forum/172969/page2 . Already a lot have been explained and I think you will find a lot of helpful facts about mql coding there

mql5saja
520
mql5saja  

mladen,

Thank you very much. I am grateful to have a friend like you.

I hope green pips always with you.

Best Regards,

anton

To add comments, please log in or register