Home Forums Trading EAs in the US Trade could not be closed due to FIFO violation Reply To: Trade could not be closed due to FIFO violation

User Avatardavidfarley

Hello Petko,

The US broker who allows different lot sizes to overcome the FIFO rule is OANDA.

Thank you for the suggestion about analyzing the growth in FX Blue. Because we would have different lot sizes, we would want to look at pips and not dollars.

The RPA I built performs the following tasks:

1. Copies the files to the MetaTrader expert advisors folder – only the current month remains in the folder.
2. Refreshes the expert advisors in MetaTrader.
3. Closes all open MetaTrader chart windows.
4. Loops through each expert advisor file in the MetaTrader expert advisors folder, performing these steps:
4a. Identify the currency pair and time frame based on the file name.
4b. Open chart window in MetaTrader for the identified currency pair and change the time frame for that chart window to the identified time frame.
4c. Add the expert advisor to the chart window that was just opened.
4d. Dynamically changes lot size based on a configuration that is set.
5. After all expert advisors are added to individual chart windows, the auto trade button is checked, or enabled.

So basically, the RPA robot is built to do everything. I am now going to modify the robot to work with three different MetaTrader accounts.

I’ll let you know if I get it to work.

Thank you!

Shopping Cart