I have this EA which has various buttons. Buttons marked with X closes the relevant pair. There is a button "B/S the direction" I want to use this button to do the following
if previous day's Close is Less than previous days Open, Sell.
if previous day's Close is greater than previous day's Open, Buy.
1) Select first pair in the list of pairs to trade
2) if a trade for the pair is active skip pair
3) if criteria for buy is met, Buy. if criteria for sell, is met Sell
4) Select the next pair and perform steps 2 and 3 above.
Continue to select all the pairs one after the other and perform steps 2 and 3
After research, I could manage to make the "Close Buttons" work as desired. However the above requirement seems to be beyond me.
Appropriate codes are required in line number 285 on wards of the attached file. Appreciate if the appropriate codes to work as above is coded into the attached.