Help me with Custom Indicator Fractal Xrust

 

Hi,

i need to use this indicator in my EA   Fractal Xrust 

but I have not been able to identify the top line and the bottom line when I call the indicator in my EA, i used icustom, after copybuffer but I can't identify the line above and below so that they intersect with the current price of my EA

I want that when the current price crosses the line above, make a purchase and when it crosses the line below, make a sale. I appreciate your valuable help, this is what I have done so far:

int OnInit()
  {
   trade.SetExpertMagicNumber(m_magic);
   trade.SetMarginMode();
   /*trade.SetTypeFillingBySymbol(Symbol());*/
   trade.SetDeviationInPoints(m_slippage);
   
   //--- tuning for 3 or 5 digits
   int digits_adjust=1;
   if(m_symbol.Digits()==3 || m_symbol.Digits()==5)
      digits_adjust=10;
   m_adjusted_point=m_symbol.Point()*digits_adjust;
   
   InpInd_Handle=iCustom(NULL,0,"fractal_level_xrust",TimeFrame,Distanse,UpName,DnName,ClUp,ClDn,comment,levels_style,levels_width);
   if(InpInd_Handle==INVALID_HANDLE)
     {
      Print("fractal_level_xrust");
      return(INIT_FAILED);
     }
  
 return(INIT_SUCCEEDED);
  }
if(CopyBuffer(InpInd_Handle,0,0,1,UpBuffer)<=0) {Print("CopyBufferUp error =",GetLastError());}
  if(CopyBuffer(InpInd_Handle,1,0,1,DnBuffer)<=0) {Print("CopyBufferDn error =",GetLastError());}


sorry if i may seem clumsy i am learning mql5 Thank you

Fractal_Level_Xrust
Fractal_Level_Xrust
  • www.mql5.com
El indicador dibuja líneas horizontales en el nivel superior e inferior del último fractal.
 
Cristian David Castillo Arrieta: but I have not been able to identify the top line and the bottom line when I call the indicator in my EA
  1. Of course, you can't. The indicator creates to lines (objects), it doesn't have plotted buffers.
  2. Since all it does is find the last up/down fractal (and moves the lines), drop the indicator, find the last two fractals yourself.
Reason: