Help: Coding SMA Crossover in Range

 

Hi everyone, 

Just wondering if you could please point me in the right direction. 

I have got an EA that I am editing. Its based on SMA Crossover strategy. I want it not to trade if last 15 candles there was a cross (to avoid range market). Is there anyone who could please help me with this?

 
jezza34:

Post your code and you may get some help. 

Use the code button (Alt+S) when pasting code.

 
Help you with what? You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
          No free help
          urgent help.

Or pay someone. Top of every page is the link Freelance.
          Hiring to write script - General - MQL5 programming forum

 

Thanks everyone. Basically I am following a simple SMA crossover strategy. The problem with SMA strategies is that they suck in the range markets and often give false signals. To solve this, I want to create an Array and store info on last crosses to make sure that if last cross has happened <20 candles it shouldn't take any trades.  So in essence, 

Trade conditions = SMA Cross & Last Cross wasn't less than 20 candles away. 

At this stage I am learning coding, It'd be great if you could point me in right direction.