I need help with icustom MQL5

 

hi guys i know its a silly question and the answer is probably very simple but im stock on this for day's now 

so all i want is to transfer a single value from my custom indicator to my ea i know this code is wrong but i need an idea/example how to do this and what im doing wrong .

i look thru everything on internet and i still do not understand this. Thank you all for help.

ea:

double value[];
double value1;
int OnInit()
 
{
value1=iCustom(NULL,0,"candlestick_patterns",value);
   
//---
   return(INIT_SUCCEEDED);
  }
void OnTick()
  {
  
 
  CopyBuffer(value1,0,0,0,value);
  ArraySetAsSeries(value,true);
  
  Comment("0",value[0]);

//---
   return;
   
  }
//+------------------------------------------------------------------+ 

indicator

double value[];
int value0;
int OnInit()
  {
ArraySetAsSeries(value,true);
   
SetIndexBuffer(0,value,INDICATOR_DATA);
 
return(INIT_SUCCEEDED);
 
  }
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],

                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
value0=1;
CopyBuffer(value0,0,0,20,value);
Step on New Rails: Custom Indicators in MQL5
Step on New Rails: Custom Indicators in MQL5
  • www.mql5.com
Finally we've got an opportunity to try the new trade terminal - MetaTrader 5. No doubt, it is noteworthy and has many new features as compared to its predecessor. The important advantages of this platform among others are: Essentially modified language allowing now to use the object-oriented programming, still allowing to use the rich...
 
baniacz1818: d i still do not understand this.
  1. Reread the iCustom documentation. It does not return a double. It does not take an array. It returns a handle that you use in your CopyBuffer call.
  2. Reread how to make indicators. You do not use CopyBuffer. you fill in the buffer(s).
 
Example: iCustom
iCustom
iCustom
  • 2019.12.01
  • www.mql5.com
Hello everyone. For a while now, I have been trying to learn how to use iCustom. I have limited sources and I get stuck quite often...
Reason: