Converting code to EA difficult

 
I got this awesome indicator and have been trying to convert it to EA but it's proving difficult. I will paste the source code here for anyone who can help me out. The indicator is self explanatory as it gives direction and SL and TP levels if anyone can convert it will be appreciated.
Files:
YIF_0026.mq4  30 kb
 
Topics concerning MT4 and MQL4 have their own section.
In future please post in the correct section.
I have moved your topic to the MQL4 and Metatrader 4 section.
 
objemmanuel: I got this awesome indicator and have been trying to convert it to EA but it's proving difficult. I will paste the source code here for anyone who can help me out. The indicator is self explanatory as it gives direction and SL and TP levels if anyone can convert it will be appreciated.

One does not "convert" Indicators into EAs. Don't mix the two! Leave the Indicator as is!

Code the EA separately to have the trading logic, and to use calls to iCustom() function to obtain the information from the Indicator to serve as the Signal.

iCustom - Technical Indicators - MQL4 Reference
iCustom - Technical Indicators - MQL4 Reference
  • docs.mql4.com
iCustom - Technical Indicators - MQL4 Reference
Reason: