Need help for Expert Advisor Programming Issue!!!

 
Hi, I'm a new MQL4 programmer and I have issue with my new expert advisor!

I used SUFX Expert Advisor Builder to build this basic Expert and I've cleaned and optimised everything I was able to...

The thing that I want my expert to do is to open a position when my indicators follow a trend. A long position (OpenBuy) when I get an up trend and a short position (OpenSell) when I get a down trend!

Everything seems to be fine but, my expert don't open any position... Maybe it's because I call the buy and sell functions inside a loop or theres an error in my basic programmation, I don't know...

My expert was based on a Basic Moving Average Crossing Indicator in which I added MACD and LaGuerre Indicators!

Thank you in advance for your help!

Gabriel

Files:
 
I don't recommend Expert Advisor Builders as they'll build bigger programs than your skills are able to trouble shoot if you're new. Start from scratch and built it one line at a time if you have to.
 
int Counted_Bars = IndicatorCounted();
You can NOT use IndicatorCounted in EA's.