Download MetaTrader 5

EA, how to get signals from an compiled ex4 indicator - page 2

To add comments, please log in or register
Wemerson Guimaraes
627
Wemerson Guimaraes  

Ok guys, understand..

 

Try to get the values and allways returns me EMPTY_VALUE, even when the arrow is printed on the gaph, returns me the same. I think this indicator will not let me get the buy/sell) indication automatically!

honest_knave
Moderator
2293
honest_knave  
Have you tried using 1 shift? Might not be painting on the current candle.
Wemerson Guimaraes
627
Wemerson Guimaraes  
honest_knave:
Have you tried using 1 shift? Might not be painting on the current candle.
Yep! Nothig works.
Donald Gibson
497
Donald Gibson  

Does anyone know of a EA that actually gets values from a Indicator?

I personally learn better if I see the actual coding.

Keith Watford
Moderator
10541
Keith Watford  
4x_Gypsy:

Does anyone know of a EA that actually gets values from a Indicator?

I personally learn better if I see the actual coding.

There should be plenty in the code base
Keith Watford
Moderator
10541
Keith Watford  
wemersonrv:

TheBuffer is my variable setted with the buffer value, because i call all buffers to inspect... and shift is because i am testing on previous bars too... just to see the results...

As you can see on the print, i need to get the value 1.1083 on one of the buffers, right? But only returns me: 0 or the value 2147483647.0

Check through the buffers using something like this

  int shift;
  double value=EMPTY_VALUE;
  for(shift=0;shift<Bars;shift++)
     {
     value=iCustom(Symbol(), PERIOD_CURRENT, "Shat-05", ......., 0, shift) ;
     if(value!=0 || value!=EMPTY_VALUE) 
        break;
     }
  if(shift<Bars)
     Print("Value found at shift ",(string)shift,", Bar time ",TimeToStr(Time[shift],TIME_DATE|TIME_MINUTES));
  else
     Print("Buffer value not found");

 If you find nothing with buffer index 0, try 1

Wemerson Guimaraes
627
Wemerson Guimaraes  
Ok, thanks... i'ts done now. I understand about the buffers after a good reading on documentation. Thanks all for your answers!
arekey
5
arekey  
Wemerson Guimaraes:
Ok, thanks... i'ts done now. I understand about the buffers after a good reading on documentation. Thanks all for your answers!

Can you share how it's been done?

Thanks.

whroeder1
16555
whroeder1  
arekey: Can you share how it's been done?
iCustom is exactly how it done. Go through the link previously provided. Detailed explanation of iCustom - MQL4 forum
12
To add comments, please log in or register