Please help to this newbie
I am new to using mql and I am using generator to create codes. I want to open position when MA Exp. 5 crosses up MA Exp. 12 = BUY , MA Exp. 5 crosses down MA Exp. 12 = SELL. But the problem is, I want to open only one position but when I check ea, it seems that when position closes, ea opens position agian because MA Exp. 5 value is more than MA Exp. 12 or less. How can I solve this problem?
I am new to using mql and I am using generator to create codes. I want to open position when MA Exp. 5 crosses up MA Exp. 12 = BUY , MA Exp. 5 crosses down MA Exp. 12 = SELL. But the problem is, I want to open only one position but when I check ea, it seems that when position closes, ea opens position agian because MA Exp. 5 value is more than MA Exp. 12 or less. How can I solve this problem?
extern int MagicNumber=10001;