stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Ditto - Empty4 to Oanda Trade Copier - As Low as 0.00001
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=5595
Page 7 of 16
Author:  Jonah [ Thu Apr 04, 2019 4:53 pm ]
Post subject:  Ditto - Empty4 to Oanda Trade Copier - As Low as 0.00001

BigRunner » Wed Apr 03, 2019 10:58 pm wrote:Hello.

I tested the new ditto.exe. When I set a pending order, ditto link continues copying the same pending order to v20, over and over until the application is killed.
I have not experienced this error myself, so when I get a chance I will try to replicate it in order to find a solution. Thank you for the bug report.
Author:  cozybooks [ Thu Apr 04, 2019 7:01 pm ]
Post subject:  Ditto - Empty4 to Oanda Trade Copier - As Low as 0.00001

HI Lonnie,

I was down to two live ditto sessions running. One is running my Peaky Fifo account. There aren't many trades and they don't happen that often. Ditto has been freezing about once per week on that account on average.

My other account has many trades opening daily. I am not using pending trades at all. Ditto on that platform has been locking up about once per day. When I say locking up, the time is no longer progressing on the EA screen, even though my other charts are still running fine.

On a few occasions, the experts tab on the Empty4 platform shows an error on setting the timer as the last entry from Ditto. I haven't been able to pin down if this happens very quickly after the EA starts or only much later on. Most of the time, however, there has been no error in the log file or message in the EA tab on the Empty4 platform. The last entry on Ditto will be for a valid trade, but nothing happens after that and at some point the EA just stops advancing or copying trades.

When I am back home, I'll try to see if there is a close time proximity between the last valid trade and Ditto freezing

Thanks,
STeve
Author:  tomele [ Thu Apr 04, 2019 7:09 pm ]
Post subject:  Ditto - Empty4 to Oanda Trade Copier - As Low as 0.00001

Hi guys.

Sifting through all the posts, I do a little stop here. One question: Does this problem mainly occur on VPS's?

Cheers
Thomas
Author:  cozybooks [ Thu Apr 04, 2019 7:29 pm ]
Post subject:  Ditto - Empty4 to Oanda Trade Copier - As Low as 0.00001

From my end, with the freezing of the Ditto EA, I am not using a VPS, although that is the eventual goal. It is running live accounts on two separate Windows 10 workstations in my office.

Thanks, Thomas, for any thoughts you can lend!
Steve
Author:  Foreverforex [ Thu Apr 04, 2019 7:46 pm ]
Post subject:  Ditto - Empty4 to Oanda Trade Copier - As Low as 0.00001

tomele » Thu Apr 04, 2019 11:09 am wrote:Hi guys.

Sifting through all the posts, I do a little stop here. One question: Does this problem mainly occur on VPS's?

Cheers
Thomas
on my end, YES! it ran flawlessly for about 16 hours on VPS, then started with the 1000's of orders thing.
Author:  tomele [ Thu Apr 04, 2019 7:51 pm ]
Post subject:  Ditto - Empty4 to Oanda Trade Copier - As Low as 0.00001

Well ...

There can be a problem on VPS's when no free handles exist to create a timer. I have written a workaround for that problem. I have never observed the problem on workstations. But one never knows.

Add the following code to your program. Then replace your EventSetTimer(xx) call with a SecureSetTimer(xx) call. You can have only one such call. Otherwise your trouble comes from not reading the MQL4 manual properly.

Code: Select all

bool SecureSetTimer(int seconds) 
{
   int error=-1;
   int counter=1;
   
   do
   {
      EventKillTimer();
      ResetLastError();
      EventSetTimer(seconds);
      error=GetLastError();
      Print("SecureSetTimer, attempt=",counter,", error=",error);
      if(error!=0) Sleep(1000);
      counter++;
   }
   while(error!=0 && !IsStopped() && counter<100);
   
   return(error==0);
}
Author:  Foreverforex [ Thu Apr 04, 2019 11:55 pm ]
Post subject:  Ditto - Empty4 to Oanda Trade Copier - As Low as 0.00001

Thanks, Thomas!

Hopefully, Lonnie will be able to implement this bit of code and we can give it a try.

Cheers,

Kris
Author:  Jonah [ Fri Apr 05, 2019 4:36 am ]
Post subject:  Ditto - Empty4 to Oanda Trade Copier - As Low as 0.00001

tomele » Thu Apr 04, 2019 11:51 am wrote:Well ...

There can be a problem on VPS's when no free handles exist to create a timer. I have written a workaround for that problem. I have never observed the problem on workstations. But one never knows.

Add the following code to your program. Then replace your EventSetTimer(xx) call with a SecureSetTimer(xx) call. You can have only one such call. Otherwise your trouble comes from not reading the MQL4 manual properly.....
Thank you for the code, Thomas!!! New version has been uploaded.
Author:  Foreverforex [ Fri Apr 05, 2019 5:20 am ]
Post subject:  Ditto - Empty4 to Oanda Trade Copier - As Low as 0.00001

Amazing! Very exciting! Thank you!

:clap: :yahoo: :good:
Author:  Foreverforex [ Fri Apr 05, 2019 5:51 pm ]
Post subject:  Ditto - Empty4 to Oanda Trade Copier - As Low as 0.00001

hmmm. curious to see how latest version is working for everyone. Not so much for me.

fired up dittolink, opened fine. put ditto on chart and it loaded current open trades into the table on the chart, and got green "Satus Okay. Monitoring Long and Short Trades for All Activity" message on top left, but no trades are being sent to my Oanda account.

I entered a couple of manually trades to test it and they're not showing up in the ditto ea chart table, so activity is not being ready by the EA. Seem to have gone from 1000s of trades being sent, to zero trades being sent. :roll:

I'm on Oanda Empty4, so should be sending pending trades. Magic Number set to 0, so all trades, manual or EA triggered, should be going through as well...

cozybooks & BigRunner - have you given it a spin yet?
All times are UTC Page 7 of 16