When you do
Price[1] > Price[2]
you're actually comparing two MqlRates structures against each other, not the prices themselves. This structure doesn't overload the operator >, thus the error. Just do it like this
Price[1].close > Price[2].closeor whatever the price series you want and you should be good (the same should be done on other code sections where comparisons are made)

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I am trying to create an EA that will buy if MA is up && Candle[1]> candle[2]
I get ">" Illegal operation use.