Ditto is trade copier that mimics the opening and closing of trades from Empty4 to Oanda's fxTrade platform. The copied trades can be any combination of the below filters.
- All trades
- A specific magic number
- A specified direction (long or short)
Trades placed by Ditto on fxTrade are of a user defined percentage of the originating Empty4 trade and can be as small as 1/10 of a percent of the smallest possible Empty4 lot size. While the smallest size within Empty4 is 0.01, fxTrade allows for trades as small as 0.00001.
In addition, for US traders, Ditto has the ability to manage 2 separate fxTrade accounts. By using one account for long trades and another for short trades, a makeshift form of hedging can be achieved by running it on a Empty4 demo account that allows hedging. Although it may be easier to simply run it on two different terminals, one for short and one for long trades.
What is Ditto link?
DittoLink is the bridge between Empty4 and fxTrade. DittoLink takes commands from Ditto and performs the opening and closing of trades and retrieves account details. One instance of DittoLink can manage multiple instances of Ditto on any number of Empty4 terminals.
What are the requirements?
In order to use Ditto you will need the following.
- An Oanda account (Demo or Live)
- At least one Oanda v20 account set up
- An Oanda v20 API key
The following features are being considered for future versions of Ditto.
- Trade sizing based on US / European margin requirements per pair. The trade size would be defined for the EURUSD which would be the basis for adjusting sizes for other pairs.
- Margin protection feature to prevent the opening of future trades. Likely just a reduction in trade sizes if margin gets below a threshold, since a full stop in trading activity would cause Ditto / Empty4 to be out of sync.
- This is beta software. I have tested on my systems and it works as it should. You may not encounter the same results. Please report any bugs.
- I am in the US and have not tested this using Oanda's API within any other country. I assume it would work the same, but I may be wrong.
This EA will automatically copy open trades from Empty4 to fxTrade. Do not connect it to a live fxTrade account until you have thoroughly tested it on a demo account.
Changelog
Version 1.0.1
BUGFIX: Ditto - Array Out of Range when changing options while trade details are open.
Version 1.0.2
BUGFIX: Ditto - Account Equity not displaying correctly.
Version 1.1.0
FEATURE: Ditto - Copy pending trades
Version 1.1.1
GENERAL: DittoLink - Error messages more specific
GENERAL: DittoLink - Status messages displayed in title bar of console
GENERAL: Ditto - Improved configuration checks when setting up Ditto
BUGFIX: Ditto: Error when using a system name that is already defined caused original system to crash
Version 1.2.1
GENERAL: Tooltips set for all objects
GENERAL: Show number of pending trades in dash
BUGFIX: Error displaying long account equity
BUGFIX: fxT pending order count
BUGFIX: Pip calculations incorrect
BUGFIX: Continue in event of unexpected shutdown.
BUGFIX: Zero divide when margin conversion pair not loaded in market watch
BUGFIX: Margin incorrectly calculated.
FEATURE: Margin calculations shown per trade, position and account.
Version 1.2.2
BUGFIX: Incremental lot calculations incorrect
Version 1.2.3
BUGFIX: Incremental lot calculations incorrect due pair naming
GENERAL: Added version number to top of dash
Version 1.2.4
GENERAL: Added clock to top of dash to determine if EA still running
Version 1.2.5
GENERAL: Updated Expiration
Version 1.2.6
BUGFIX: Lot size calculation corrected for varying lot sizes
Version 1.2.7
GENERAL: Implemented Thomas's secure timer code (Thank you, Thomas!!!)
Version 1.2.8
BUGFIX: Zero divide error fix on lot calculation
Version 1.2.9
GENERAL: Fixed P/L displaying wrong color when including swap
TEMP BUGFIX: Added 5 second delay between trades to limit occurrence duplicate lot sizes
Version 1.2.10
GENERAL: Updated Expiration
Version 1.3.0
FEATURE FIX: Incremental lot size calculation removed from Ditto and added to DittoLink.
GENERAL: Updated Expiration
Version 1.3.1
GENERAL: Updated Expiration
Version 1.3.2
GENERAL: Updated Expiration
Version 1.3.3
GENERAL: Updated Expiration
Version 1.3.4
GENERAL: Updated Expiration
Version 1.3.5
GENERAL: Updated Expiration
Version 1.3.6
GENERAL: Updated Expiration
.