How can I get Data from this Indicator?

 

Hello All,

I want to make an Expert that using market entry and market exit by below Indicator:

when Indicator change color, Expert should enter market,

I read about iCustom function, I test it with this indicator,

But this function in this indicator only one double value output,

How can I do this?

Indicator has been attached.

Big trend

Files:
Big_Trend.mq4  9 kb
 
double  iCustom(
   string       symbol,           // symbol
   int          timeframe,        // timeframe
   string       name,             // path/name of the custom indicator compiled program
   ...                            // custom indicator input parameters (if necessary)
   int          mode,             // line index
   int          shift             // shift
   );

There are 3 buffers in the EA you attached

0 = Uptrend

1 = Dntrend

2 = ExtMapBuffer

So set the mode value accordingly and you will get the values you need.

 
MOFEX:

Hello All,

I want to make an Expert that using market entry and market exit by below Indicator:

when Indicator change color, Expert should enter market,

I read about iCustom function, I test it with this indicator,

But this function in this indicator only one double value output,

How can I do this?

Indicator has been attached.


    double Uptrend = iCustom(NULL, 0, "Big_Trend",0,1);
    double Dntrend = iCustom(NULL, 0, "Big_Trend",1,1);
    if(Uptrend!=EMPTY_VALUE) Print("Up trend signaled");
    if(Dntrend!=EMPTY_VALUE) Print("Down trend signaled");
 
MOFEX:

Hello All,

I want to make an Expert that using market entry and market exit by below Indicator:

when Indicator change color, Expert should enter market,

I read about iCustom function, I test it with this indicator,

But this function in this indicator only one double value output,

How can I do this?

Indicator has been attached.


Hi Mofex - What I can see in the code you only need to read the value of buffer 2 - Buffers 0 and 1 are uptrend and downtrend but their values are being used to provide the output of buffer 2 - so if buffer 0 value is zero (0) buffer 2 shows the value of buffer 1 and vice versa.

double Trend0 = iCustom(NULL, 0, "Big_Trend",2,0); //Current value
double Trend1 = iCustom(NULL, 0, "Big_Trend",2,1); //Previous value

if(Trend0 > Trend1){UpTrend == true;DnTrend == false;}

if(Trend0 < Trend1){DnTrend == true;UpTrend == false;}