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

Post Reply
User avatar
cozybooks
Trader
Posts: 301
Joined: Wed Mar 27, 2013 1:33 am

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

Post by cozybooks »

No problem, I can use Global Prime, FX Choice or Oanda demos depending on the type of trading.

Thanks,

Steve
User avatar
cozybooks
Trader
Posts: 301
Joined: Wed Mar 27, 2013 1:33 am

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

Post by cozybooks »

Hi Lonnie,

A quick update. Five Ditto platforms running at once on the same station, working with five Empty4 platforms (2 Global Prime, 3 FX Choice). All running smoothly except for one small issue. Somewhere over the weekend I had closed four out of the five Ditto platforms on that station and forgot to restart them. I restarted them this morning and all worked great expect for a FIFO violation error on a EURUSD sell trade. On January 30th, Ditto opened a sell for 103 units, then opened another sell for 103 units on the 31st.

I only knew it was a problem when the Ditto restart tried to close the newer one because I had closed it on my Empty4 plaform to take some profits. Of course, when I went into FX Trade to close the older one manually, Ditto dutifully closed the newer one it was trying to close, and then in a nifty step I hadn't thought about, it opened a new trade for 103 units to replace the one I had closed manually.

I think (but I'm not sure) that the problem may have happened when I was starting my fifth Ditto platform. I did it by copying an existing one, then starting it up and changing it to the new Oanda sub-account, but for a few brief seconds, I realized after I did it that I had two ditto platforms both trying to update the same Oanda account.

Anyway, mostly I wanted to let you know that with all of the activity, it's only happened the once and I believe it was through my own lack of care setting up the new account. I try to check the Ditto platforms once a day just to make sure they still say they're connected, so in one way, it was nice that the FIFO error was scrolling along as it kept trying to close the newer order. It made it obvious there was a problem, and when I took care of the one trade manually, Ditto did everything else.

Thanks again for everything! You've made trading fun again! I purposely did the tiny 100 unit lots when I went live to test how things went, but I have to say that it creates a freedom for trading, and even with such tiny lot sizes, the profits build fairly quickly.

Happy trading! :clap:
Steve
BigRunner
Trader
Posts: 10
Joined: Sat Dec 15, 2012 3:41 am

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

Post by BigRunner »

First, thank you Lonnie, for sharing this solution to undesirable CTFC/NFA regulations that hinder and complicate our trading styles. The no hedging rule and FIFO has been very very troublesome for us since its implementation, and I'd like more leverage available if I so choose to use it. These types of restrictions are a catalyst for US citizens to go to unregulated off-shore brokers where our money is at risk. After what happened to Tallinex and their US client base with the CTFC lawsuit, I'm having second thoughts about funding offshore brokers due to concern that they will also be sued by the CTFC, causing a costly legal battle where our funds may be frozen in the broker's bank accounts (or what ever happens in a costly legal battle). :?


With this in mind and the development of Ditto, I'm considering increasing funding to my OANDA accounts instead of risking losing money in with an offshore broker that accepts US clients (I'll still have small accounts with several). This Ditto EA makes that possible, and it opened up a better trading world, especially employing the EAs tested in this forum. Lonnie and all the contributing members are awesome!



I've been using Ditto mostly with success for several weeks, so it works. That said, I'd like to piggy back on the last post from Steve (cozybooks). This week I ran into a few FIFO errors after I started to employ a grid trading EA. The Grid EA was set up to trade in one direction only (buy only or sell only) where it takes profit and opens a new trade at the user defined "gap" setting (grid levels).


When more than one trade is opened in a given currency pair at the same lot size, Ditto properly increases each trade incrementally by the smallest unit size (0.00001). At some point during the EAs operation of opening and closing trades in the grid, Ditto opened a trade with the exact same lot size as an open position. I am not exactly sure how that happened. However, what I do know is that the FIFO error occurred when the price moved against the profitable direction, opened a trade with the same lot size as the unprofitable trade, and then price reversed to the take profit level of the newly opened trade. The older trade was at break-even to slightly negative. The Grid EA closed that newer position that was in profit as it should, DittoLink copied the trade to the fxTrade platform, but an error was thrown due to a FIFO violation, because the older trade was not closed first (geesh, explaining FIFO is complicated).

I was not there to witness it, but boy did that error message ever get thrown! When I got on my PC, I noticed that the DittoLink python program window was closed, so I started inspecting. In my OANDA fxTrade platform, there were thousands and thousands of error messages for failed orders in the activity window/log. They cleared tonight. I think that the DittoLink python program eventually closes down and the 15,000 messages stopped at that point. I figured that was the logic of the EA and the program doing their thing (incessantly). =) I have no complaints, except to some of the NFA regulations. I just want to make you and the community aware of this issue. Again, I'm very encouraged with this development.

I hope this post helps, and I can provide more information on the details upon request.

Thank you!

Patrick

P.S.

To the CTFC/NFA forex regulators who think they know what is best for us :arrrg: :x
I know you mean well, but you really screw people up that know what they are doing.


&&


To Lonnie and all the contributing members of this forum

:clap: :yahoo: :clap: :good: :P :party: Pip time!!
Last edited by BigRunner on Thu Feb 21, 2019 2:57 am, edited 1 time in total.
User avatar
cozybooks
Trader
Posts: 301
Joined: Wed Mar 27, 2013 1:33 am

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

Post by cozybooks »

Following up on Patrick's post, I had one more problem this week with a duplicate trade size on GBPUSD - two trades for size 110. My dittolink had closed as well - I assumed I closed it accidentally but now I'm wondering if you have it set to close automatically if an error continually pops up.

Wondering based on what Patrick is saying is if the problem happens when a trade in the middle closes, leaving that slot open - e.g. trades of 101,102,103,104, 105. Trade for 103 is closed. Is it possible a new 103 fills in, then it gets stuck repeating 104?

Just taking a wild stab since I have no idea how you are determining what lot size to use next.

Interesting side note - I manually entered a trade of .04 on my Empty4 platform, which created a trade of 400 units using my formula. The actual trade entered was for 410 units. Not sure that matters in any way, but thought I'd throw it out there.

Overall, could not be happier! Nice to be back trading for real after so many years!

Steve
User avatar
cozybooks
Trader
Posts: 301
Joined: Wed Mar 27, 2013 1:33 am

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

Post by cozybooks »

HI Lonnie,

Are you still out there or has the project created too many headaches? If so, don't keep reading. This bouncing ball is tough to follow.

Confirming that the trade duplication is still happening. GBPUSD long - I had two long trades with size of 109 units, created about five days apart, newer one trying to close. I manually closed the older trade for 109 units, which allowed the newer trade for 109 units to close as well.

Interesting. 100-102, 105-109 were all available unit sizes now. I had existing trades open for 103,104, 110, 111, 112 and 113 units. Ditto now had to replace the trade I manually deleted that was 109 units. It opened the new trade, but for 111 units, which created a new duplication. Now I had two trades at 111 units.

Okay, this will make your brain hurt. So I now manually closed the older trader with 111 units. I waited a minute, watching the FXtrade screen in Oanda, thinking the trade I deleted would be opened up again. I wanted tos see what size Ditto gave it. Nope. Instead, when I went back to the Empty4 platform, the new trade had been closed there.

Hmmm..... Could have just been funny timing - Empty4 platform just happened to close that trade around the same time because, well... that's what Empty4 platforms do...

So, I used one of Steve's scripts to open my missing trade on the Empty4 platform. Ditto immediately opened a new trade, which would have been good except it was for 110 units, same as an existing trade.

Hmmm.... part two. Okay, so I closed the older trader for 110 units, then waited for Ditto to open a new trade. Nothing happened. I checked the Ditto EA running on the Empty4 platform, it still thinks there are 9 long trades in the FXTrade account, even though there are now only 8. Now I'm thinking the Empty4 platform might be doing funny things because I have seven Empty4 platforms running on the one computer. So I close Empty4 and Dittolink. Restart them and presto, my 9th trade opens on Fxtrade - but with 110 units, same as an existing trade.

I tried one more set of deleting the old trade and restarting dittolink, but it again opened a new trade for 110 units, so for the moment I'm kind of stuck there with two long trades at 110 units.

Any ideas???

Thanks,
Steve
Jonah
Trader
Posts: 47
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 »

Let me start off by saying that I am sorry for not responding to this thread sooner.

So, for the past 27 years I have been a bartender on the Las Vegas Strip. Programming has been a hobby for as long as I can remember and I have often dreamed about doing it for a living. At the end of January, for kicks, I applied for a job as a full-stack web developer and to my surprise I got the job. At the age of 48 I am going through a career change! It is very exciting but the wife is very leery so I am going to work both jobs until the end of October and then make a decision on whether to fully transition to dev work. So far I love it, but unfortunately this does not leave me as much time to work on Ditto as I would like.

Anyway, I took a look at the lot sizing problem today and have uploaded a new version. The problem was that trade sizes were being calculated before data was finished downloading from Oanda. Please test and report back.

Rest assured that I have not given up on Ditto and will continue to support it as much as I can.
-- 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: 301
Joined: Wed Mar 27, 2013 1:33 am

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

Post by cozybooks »

Hi Lonnie,

Thanks, I will give this a try and report back! I was getting around the problem temporarily by changing the percentage in the link by one percent at a time, which resulted of course in a new set of lot sizes.

Fingers crossed! :clap: :clap:
Steve
User avatar
cozybooks
Trader
Posts: 301
Joined: Wed Mar 27, 2013 1:33 am

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

Post by cozybooks »

And, of course, best of luck from everyone on the career change! Or, addition, at this point.
We are very appreciative with everyone you've done and will be patient.
:party: :party: :party:
User avatar
cozybooks
Trader
Posts: 301
Joined: Wed Mar 27, 2013 1:33 am

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

Post by cozybooks »

Early duplication. GBPUSD sell trade. Had existing open trades of 100, 131 and 300 units. Added a new manual .01 sell on the Empty4 platform with percentage set to .10. Ditto added a new trade for lot size 100, creating two sell trades with a lot size of 100 units.

I deleted the oldest of the 100 unit trades. Ditto didn't automatically add back a new trade, so I closed dittolink, restarted it, and got a new trade for 100 units, so I still ended up with two trades of 100 units.

Thanks,
Steve
User avatar
cozybooks
Trader
Posts: 301
Joined: Wed Mar 27, 2013 1:33 am

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

Post by cozybooks »

btw, is there anywhere on the ditto EA screen where it shows the version number? If not, it would be helpful to have it there. When something doesn't work, the first thing I do is check to make sure I am really running the version I think I am. I like to copy the latest version to the wrong folder, just to prolong my problems as long as I can! :?

Thanks!

Steve
Post Reply

Return to “Automated trading systems”