Ditto - Empty4 to Oanda Trade Copier - As Low as 0.00001

Post Reply
Jonah
Trader
Posts: 46
Joined: Sat May 11, 2013 4:13 pm
Location: Las Vegas

Ditto - Empty4 to Oanda Trade Copier - As Low as 0.00001

Post by Jonah »

ditto121.png
What is Ditto?
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)
Ditto was developed to give traders with small accounts the ability to trade multi pair systems. This works with Desky and any other EA that has the ability to assign a magic number to trades.

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
Possible future features
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.
Notes
  • 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.
Warning
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
.
You do not have the required permissions to view the files attached to this post.
Last edited by Jonah on Tue Jun 13, 2023 10:04 am, edited 25 times in total.
-- Lonnie.

"Give a man a program, frustrate him for a day. Teach a man to program, frustrate him for a lifetime." (Muhammad Waseem)
User avatar
cozybooks
Trader
Posts: 299
Joined: Wed Mar 27, 2013 1:33 am

Ditto - Empty4 to Oanda Trade Copier - As Low as 0.00001

Post by cozybooks »

Lonnie,

Our U.S. trading hands are shaking thinking about using this. I can't wait to try it out. There aren't enough thanks in the world for what you have done.

Imagine any trader being able to run live on a tiny Oanda $100 account and get real time results!

:smile: :smile: :clap: :clap: :smile: :smile: :party: :party: :party: :party: :party: :clap: :clap: :smile: :smile: :clap: :clap: :party: :party: :party: :party: :party:
Jonah
Trader
Posts: 46
Joined: Sat May 11, 2013 4:13 pm
Location: Las Vegas

Ditto - Empty4 to Oanda Trade Copier - As Low as 0.00001

Post by Jonah »

cozybooks » Sat Jan 05, 2019 4:52 pm wrote:Imagine any trader being able to run live on a tiny Oanda $100 account and get real time results!
This is the reason that I wrote this and is exactly what I will be doing. I am going to test for 1 more week to work out any potential bugs that may arise and will be running it on a few different systems on small accounts starting next week.
-- Lonnie.

"Give a man a program, frustrate him for a day. Teach a man to program, frustrate him for a lifetime." (Muhammad Waseem)
User avatar
tomele
Administrator
Posts: 1166
Joined: Tue May 17, 2016 3:40 pm
Location: Germany, Forest of Odes, Defending the Limes

Ditto - Empty4 to Oanda Trade Copier - As Low as 0.00001

Post by tomele »

What a breathtaking stuff!

:party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party:
Happy pippin, Thomas :-BD

It ain't what you don't know that gets you into trouble.
It's what you know for sure that just ain't so.
(Mark Twain)

Keep the coder going: Donate
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Ditto - Empty4 to Oanda Trade Copier - As Low as 0.00001

Post by milanese »

tomele » Sun Jan 06, 2019 3:34 pm wrote:What a breathtaking stuff!

:party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party:
fantastic!! :rocket: :rocket:
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Ditto - Empty4 to Oanda Trade Copier - As Low as 0.00001

Post by SteveHopwood »

Wonderful stuff Lonnie. This will be a huge benefit to anyone whose broker is Oanda. :clap: :clap: :clap: :clap: :clap: :clap: :clap: :clap: :clap: :clap: :clap: :clap:

:xm: :rocket:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
Jonah
Trader
Posts: 46
Joined: Sat May 11, 2013 4:13 pm
Location: Las Vegas

Ditto - Empty4 to Oanda Trade Copier - As Low as 0.00001

Post by Jonah »

Uploaded version 1.0.1.

Fixed a bug where an array out of range error would occur if options were changed while the details of individual trades were being displayed.
Last edited by Jonah on Sat Jan 12, 2019 4:39 am, edited 1 time in total.
-- Lonnie.

"Give a man a program, frustrate him for a day. Teach a man to program, frustrate him for a lifetime." (Muhammad Waseem)
Jonah
Trader
Posts: 46
Joined: Sat May 11, 2013 4:13 pm
Location: Las Vegas

Ditto - Empty4 to Oanda Trade Copier - As Low as 0.00001

Post by Jonah »

Uploaded version 1.0.2

Another bugfix. The Account Equity was not being calculated and displayed in the dashboard.
Last edited by Jonah on Sat Jan 12, 2019 4:39 am, edited 1 time in total.
-- Lonnie.

"Give a man a program, frustrate him for a day. Teach a man to program, frustrate him for a lifetime." (Muhammad Waseem)
User avatar
cozybooks
Trader
Posts: 299
Joined: Wed Mar 27, 2013 1:33 am

Ditto - Empty4 to Oanda Trade Copier - As Low as 0.00001

Post by cozybooks »

Lonnie,

So far, so good on Ditto testing. Will keep you apprised if I run into any issues this week.

Thanks for the great work on this! :smile: :smile: :smile:

Steve
Jonah
Trader
Posts: 46
Joined: Sat May 11, 2013 4:13 pm
Location: Las Vegas

Ditto - Empty4 to Oanda Trade Copier - As Low as 0.00001

Post by Jonah »

Uploaded version 1.1.0.

Added the ability for Ditto to copy pending trades. This feature can be disabled and will only work correctly on Oanda Empty4 terminals. With other brokers the price difference would cause Ditto to get out of sync.
Last edited by Jonah on Sat Jan 12, 2019 4:39 am, edited 1 time in total.
-- Lonnie.

"Give a man a program, frustrate him for a day. Teach a man to program, frustrate him for a lifetime." (Muhammad Waseem)
Post Reply

Return to “Automated trading systems”