Translate Indicator Code into EA

 

Hello, im trieing to use code of indicator in an EA. 

I get the Error :

OnCalculate function not found in custom indicator              1       1 'error in the first line ?

 

How can i fix these ?  Ty for coming help :)

These are my #propertys

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Lime
#property indicator_width1 3
#property indicator_color2 OrangeRed
#property indicator_width2 3
 
c0ntr0x:

Hello, im trieing to use code of indicator in an EA. 

Don't,  use iCustom() instead . . . or do lots and lots of reading:  https://www.mql5.com/en/articles/1456