Download MetaTrader 5

How do I draw MACD in the sub windows from code (MQL4)

To add comments, please log in or register
Track all payments in your profile. It is easy!
s050399b
714
s050399b 2016.04.29 15:43 

How do I draw MACD in the sub windows from code (MQL4)?

 

I know I can remove the indicator by calling ChartIndicatorDelete.

But how do I call it from code? 

Aleksei Beliakov
23934
Aleksei Beliakov 2016.04.29 16:59  
use iCustom or imacd
Alain Verleyen
Moderator
30727
Alain Verleyen 2016.04.29 18:26  
Aleksei Beliakov:
use iCustom or imacd
He wants to add the indicator to the chart.
s050399b
714
s050399b 2016.04.30 00:17  
Alain Verleyen:
He wants to add the indicator to the chart.

Yes, I want it to add into chart.

 I was thinking of calling MACD to the chart by pressing a key, and remove it by pressing a key via CHARTEVENT_KEYDOWN.

Aleksei Beliakov
23934
Aleksei Beliakov 2016.04.30 09:18  
You can make a template with this indicator and call ChartApplyTemplate
s050399b
714
s050399b 2016.04.30 16:51  
Aleksei Beliakov:
You can make a template with this indicator and call ChartApplyTemplate
Can't do that, lots of stuffs on my chart
Marco vd Heijden
Moderator
4688
Marco vd Heijden 2016.04.30 17:08  
s050399b:
what do you mean?

Exactly what he says.

ChartApplyTemplate()
https://www.mql5.com/en/docs/chart_operations/chartapplytemplate
Documentation on MQL5: Chart Operations / ChartApplyTemplate
Documentation on MQL5: Chart Operations / ChartApplyTemplate
  • www.mql5.com
Chart Operations / ChartApplyTemplate - Reference on algorithmic/automated trading language for MetaTrader 5
Alain Verleyen
Moderator
30727
Alain Verleyen 2016.04.30 17:44  
Aleksei Beliakov:
You can make a template with this indicator and call ChartApplyTemplate
It will stop your calling code.
Alain Verleyen
Moderator
30727
Alain Verleyen 2016.04.30 17:48  
s050399b:

Yes, I want it to add into chart.

 I was thinking of calling MACD to the chart by pressing a key, and remove it by pressing a key via CHARTEVENT_KEYDOWN.

You need to use WinAPI call, I already posted the code on this forum, but can't find it now as the Search Engine is not working once again.
s050399b
714
s050399b 2016.04.30 18:11  
Alain Verleyen:
You need to use WinAPI call, I already posted the code on this forum, but can't find it now as the Search Engine is not working once again.

https://docs.mql4.com/chart_operations

 

Is there a way to Close a sub window?

 

I am calling MACD from my indicator, and when I remove the MACD indicator, it will remove my indicator too.

 I need my indicator to be running, just remove the MACD indicator or remove the sub window 

Chart Operations - MQL4 Reference
Chart Operations - MQL4 Reference
  • docs.mql4.com
Chart Operations - MQL4 Reference
s050399b
714
s050399b 2016.04.30 18:12  
is there a search function on the forum? i couldn't find it
12
To add comments, please log in or register