Put 2 or more indicators in the same subwindow

 
int OnInit()
  {
//---
   Newbar();

   ma_Handle= iMA(_Symbol,PERIOD_CURRENT,maPeriod,0,MODE_SMA,rsi);

   rsi= iRSI(_Symbol,PERIOD_CURRENT,7,PRICE_CLOSE);
   stocha=iStochastic(_Symbol,PERIOD_CURRENT,13,3,3,MODE_SMA,STO_CLOSECLOSE);
   ChartIndicatorAdd(0,1,rsi);
   ChartIndicatorAdd(0,1,stocha);
   ChartIndicatorAdd(0,1,ma_Handle);


//---
   return(INIT_SUCCEEDED);
  }

I'm trying to put 3 indicators in the same sub-window. But I fail

I need help

 

Please don't write in ALLCAPS. It is considered shouting and rude.

 
Fernando Carreiro # :

Please don't write in ALLCAPS. It is considered shouting and rude.

THANKS. I'm not going to do it again

 
Bahijulien:

I'm trying to put 3 indicators in the same sub-window. But I fail

I need help

I don't know if it's possible by API, but you can drag and drop them...

What's the error code??
 
Dominik Egert # :
I don't know if it's possible by API, but you can drag and drop them...

What's the error code ??

I am writing a code that will allow my EA to put the 3 indicators (RSI, stochastic and MIBI average) together in the same sub-window. but I can't do it

 
Bahijulien #:

I am writing a code that will allow my EA to put the 3 indicators (RSI, stochastic and MIBI average) together in the same sub-window. but I can't do it

So, what is the error code ?? Value of _LastError.

What is happening instead?
 
Dominik Egert #:
So, what is the error code ?? Value of _LastError.

What is happening instead?

I thought that with '' chartindicatoradd '' the three indicators would be together in a sub window


 but this is not the case.  the indicators always work separately.  how to put them together

 in a window?

 
Bahijulien #:

I thought that with '' chartindicatoradd '' the three indicators would be together in a sub window


 but this is not the case.  the indicators always work separately.  how to put them together

 in a window?

According to documentation, you can specify the subwindow you are targeting. - Have you tried that???


https://www.mql5.com/en/docs/chart_operations/chartindicatoradd

Documentation on MQL5: Chart Operations / ChartIndicatorAdd
Documentation on MQL5: Chart Operations / ChartIndicatorAdd
  • www.mql5.com
ChartIndicatorAdd - Chart Operations - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Reason: