EA placing same order copy of previous order

 

i m in  trouble, suppose my signal provider open 5 orders in diff pair at a time or in 5 sec,

  my EA only select last opened order where others are missing  which opened 4 sec before....and sometimes EA opening 2 order of same pair where i only want one order as signal provider opened order with comments "A1"

my 2 EA attached where v1 is search last order only and open new one just copy of last detected order with specific lot size but its sometimes open order of  previous record order not latest one

in v2 , it first detect one order with specific comment then search again to match comment of same its ticket, if not match open new order with its ticket in comment....but when opening new order, in comment ticket number not coming  only 1 is printing in order comment that why its opening order again and again

what i want if there are 5 pair orders with comment "A1 Daily Profit" with lot size 0.01, i want to open same another 5 order for 5 pair with 0.10 lot as duplicate in same terminal and in comment show ticket number of 0.01 lot.

so EA search for opened order for comment, select one "A1 Daily Profit", search others comment where new 0.01 ticket and 0.10 comment must match, if match no entry if not, place order with 0.10 lot with same ticket no of 0.01 lot in comment 



i need some help, please
Files:
EA_00_v1.mq4  4 kb
EA_00_v2.mq4  3 kb
Reason: