Forum

Having a hard time getting my EA to close trades

void start() { //Find Moving Averages double fastma, slowma; double total; bool ticket; fastma = iMA ( Symbol (), 0 , 5 , 0 , MODE_EMA , PRICE_CLOSE , 1 ); slowma = iMA ( Symbol (), 0 , 8 , 0 , MODE_SMA , PRICE_CLOSE , 1 ); total = OrdersTotal (); //Start operations if (total < 1 ) {

EA will not run on multiple pairs, need help

I am very new to coding mql4, and have completed my first EA. My only problem now is that I cannot get it to open trades on more than one pair. In the EA section on the terminal next to journal, it send a stream of the error, invalid ticket for orderclose function , even though the EA opens and