I kept getting this error when I was trying to use an expert advisor.

I found my solution to be the position size was too small in my EA settings. I had a position size of 0.01, however my broker starts at 0.1.

This error could also happen if you had a system which multiplies the position size up, such as a martingale, where the multiplied position size isn't a value which the broker allows. For example, if you had a position size of 0.1, and you multiplied that by 2.4, the EA would try to open a position which is 0.24, which your broker may not allow.