This EA checks the gold pairs (XAU, Gold) in the Market Watch section and place trades on them according to the conditions.
Fetch All Gold Pairs from Market Watch and then check which pair have lowest Ask Price then place Buy trade on it and check which pair have highest Bid Price then place Sell trade on it. No other Pairs i.e EURUSD, GBPUSD should not take trades only the Gold ones included in it.
If Buy trade count == 0 then place Buy trade on pair having lowest Ask price available in the Market Watch.
If Sell trade count == 0 then place Sell trade on pair having highest Bid price available in the Market Watch.
Continuously monitor total net profit of all active trades. If combine profit of buy and Sell is 1 $ (user input) then Close All Trades. Basket TP: Configurable in account currency (e.g., 1 $). Then Repeat The Cycle again from start.
Magic no = 333 (user input). lot Size = 0.1 (user input). basketTakeProfit = 1 $ (user input).