Put Indicator on Chart sub window

 

Hello everyone,

How do I place some indicators on chart sub window, for example ADX and RSI.

 
Drag it there from the navigator.
 

Sorry I meant how do you put indicators in to EA code.

 

Hello again,

I tried this, and for the 10th attempt to use iCustom() failed again.

  double pop= iCustom(NULL,0,"ADX.ex4",14,MODE_CLOSE);
 
GrumpyDuckMan:

Hello everyone,

How do I place some indicators on chart sub window, for example ADX and RSI.

Is this what you seek?

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

 
GrumpyDuckMan: I tried this, and for the 10th attempt to use iCustom() failed again.

  1.   double pop= iCustom(
    NULL,
    0,
    "ADX.ex4",
    14,
    MODE_CLOSE
    No mode
    No shift
    );
    
    so it's taking buffer #14, shift 3 (mode close)
    double  iCustom(
       string       symbol,           // symbol
       int          timeframe,        // timeframe
       string       name,             // path/name of the custom indicator compiled program
       ...                            // custom indicator input parameters (if necessary)
       ...                            // custom indicator input parameters (if necessary)
       int          mode,             // line index
       int          shift             // shift
       );
    iCustom - Technical Indicators - MQL4 Reference
  2. You don't need the .ex4 Detailed explanation of iCustom - MQL4 and MetaTrader 4 - MQL4 programming forum

  3. Do you have a custom indicator ADX.ex4 in the <data folder>/indicators folder? If not use the built in one.
              iADX - Technical Indicators - MQL4 Reference
 

Hello again,

I think whroeder1 answered it already in post #1. I am trying to add the indicators to sub windows in the current chart. Maybe I should be writing an indicator and not a Expert advisor to do this with.

 
 
whroeder1:
Drag it there from the navigator.

Hello whroeder1,

Is it possible to code an indicator to automatically appear in a sub window inside the current chart with only using EA?

I was think that I might be able to use ObjectCreate() and plot the incoming values with dots, but that is still in the chart not a sub window.

 
EAs have no eyes. They can't see the indicators on the chart. Those are for the human to see.
Just get the value(s) of the indicator(s) into the EA and do what you want with it.
You should encapsulate your iCustom calls to make your code self-documenting.
          Detailed explanation of iCustom - MQL4 and MetaTrader 4 - MQL4 programming forum
Reason: