Ma Crossover and wait 3 candle for next trade, after consecutive bullish candles !

 
Please Help me.

the expert should enter first trade after a Ma Crossover then need to wait minimum  3 candle for the next trade.

if 3  consecutive bullish candles happens. there should be  a buy order & after that more three candle need to wait if this 3 candle is bullish expert should open another buy order.

my code enter in next position right after the initial trade if there is any  consecutive bullish candles. but i wants to wait minimum 3 candle for each position ea enter.
i am giving you guys the sample of the test and the code as well. 
Files:
s1.png  9 kb
s2.png  24 kb
 
Mohammad Shahin: Please Help me.
  1. Why did you post your coding question in the MT5 General section (a miscellaneous catch-all category) instead of the MT5 EA section (non-indicator coding)?
              General rules and best pratices of the Forum. - General - MQL5 programming forum? (2017)
    Next time, post in the correct place. I have moved this thread.

  2. 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 difficulty.
         How To Ask Questions The Smart Way. (2004)
              Prune pointless queries.

    You have only four choices:

    1. Search for it (CodeBase or Market). Do you expect us to do your research for you?

    2. Try asking at:

    3. MT4: Learn to code it.
      MT5: Begin learning to code it.

      If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into your code.
                I need HEEEELP, please, it's URGENT...really ! - General - MQL5 programming forum (2017)

    4. Or pay (Freelance) someone to code it. Top of every page is the link Freelance.
                Hiring to write script - General - MQL5 programming forum (2019)

    We're not going to code it for you (although it could happen if you are lucky or the problem is interesting.) We are willing to help you when you post your attempt (using CODE button) and state the nature of your problem.
              No free help (2017)