Dukascopy plugin (yet another version)

Posted By: kvm

Dukascopy plugin (yet another version) - 07/06/18 12:40

Hi,

This is my version of Dukascopy plugin. It uses latest JForex API and it supports the new Zorro methods (introduced in v1.83) to set limit orders.

Here is the bin distribution: Zorro Plugin for Dukascopy

Thanks,
kvm
Posted By: debs

Re: Dukascopy plugin (yet another version) - 08/23/18 08:51

Thanks a lot for your effort kvm! I'll try it next week..
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 10/05/18 08:28

New version 1.1 is available. Fixed margin and pip cost calculations. Tested with Zorro v1.88.6 and some of the Z strategies.

Custom assets file is included in the distribution, which you can use as a starting point for running the Z strategies.
Posted By: ags

Re: Dukascopy plugin (yet another version) - 10/23/18 15:56

Hy kvm, how was your experience with Dukascopy till now?
I'm trying a Dukascopy BANK (because of the leverage possibilities) and found some troubles.
With original DLL that comes in the package, the connection is very low and somehow not really responsive. I tried the seccond one you shared here and with this Zorro crashes...

Any idea what I'm doing wrong? With other brokers I have no problem.
Thanks, ags
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 10/24/18 09:01

I'm running the Z12 strategy on a demo account, using Zorro 1.88.2 and haven't got any problems.
While testing the plugin with the latest version of Zorro (1.88.6) I'm getting the same crash.
But after several tests it comes out that the error is not in the plugin but in the Z12 strategy, because Z1, Z2 and Z7 strategies work without any problems:

Zorro 1.88.6 in Diagnostics mode - Strategy Z12 with Verbose 15 and EUR/USD only
Plugin Result Diagnostics
FXCM ACCESS VIOLATION no errors
Oanda ACCESS VIOLATION no errors
Dukascopy ACCESS VIOLATION Error 055: No bars generated
vDukascopy-1.1 ACCESS VIOLATION no errors

Zorro 1.88.2 in Diagnostics mode - Strategy Z12 with Verbose 15 and EUR/USD only
Plugin Result Diagnostics
FXCM OK no errors
Oanda OK no errors
Dukascopy LOGOUT Error 055: No bars generated
vDukascopy-1.1 OK no errors



Attached picture crash.jpg
Posted By: ags

Re: Dukascopy plugin (yet another version) - 10/24/18 12:42

Hi kvm, thank you very much for the information and specially for the dll !
is interesting, apparently it depends on the broker, I have a Z12 running from a Z 1.88.6 in a live Oanda account and it works smoothly.
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 10/24/18 13:31

I've just tested the Oanda plugin and the result are same: in my test environment all plugins work with Z12 in Zorro 1.88.2 but doesn't work in Zorro 1.88.6.

Attached File
oanda.jpg  (53 downloads)
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 10/25/18 11:11

Originally Posted By: ags
is interesting, apparently it depends on the broker


No, I doubt that this is the problem. Can you give me logs or detailed description so i can try to reproduce and fix the problem?
Posted By: ags

Re: Dukascopy plugin (yet another version) - 10/25/18 18:39

Mm, again, I have a Z12 running from a 1.88.6 Live from an AWS and a Demo, both on Oanda without problems. See attached.

Comming back to Dukascopy, what I still try to make work because the better leverage (no ESMA limitations) besides the crashes from zorro, I only get the messages from the API:

!Command 45 not yet supported
!Command 43 not yet supported
!Command 172 not yet supported

while trying a Z1 2 or 12 all the same problem.

Attached File
Oanda.JPG  (65 downloads)
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 10/26/18 07:28

Are you using the latest version of the plugin? It's 1.1.
Posted By: ags

Re: Dukascopy plugin (yet another version) - 10/26/18 13:43

Yes, got the vDukascopy-1.1

I'm getting those messages also with an IG Plugin, any idea waht this means?

!Command 45 not yet supported
!Command 43 not yet supported
!Command 172 not yet supported

Maybe a problem with the java?
Posted By: AndrewAMD

Re: Dukascopy plugin (yet another version) - 10/26/18 14:23

Originally Posted By: ags
Yes, got the vDukascopy-1.1

I'm getting those messages also with an IG Plugin, any idea waht this means?

!Command 45 not yet supported
!Command 43 not yet supported
!Command 172 not yet supported

Maybe a problem with the java?
You can ignore these messages.

Any message in the log starting with "!" is coming from the plugin. The plugin writer can choose to implement or not implement any broker command. The plugin writer decided to output this message for unavailable commands (zorro.exe is making the calls) - in my opinion, there is no need for the messages, maybe log-only would be appropriate.

Are you absolutely sure that you're using kvm's plugin and not the other Dukascopy plugin?
Posted By: ags

Re: Dukascopy plugin (yet another version) - 10/26/18 15:57

Hi AndrewAMD,

thank you for the comments about the messages.
Yes, I'm testing both of them, with similar results. Cmpared with the Oanda Live connection (not Java environment) the Dukascopy connection seams not so stable.

Now vDukascopy-1.1 generates otehr errors like the attached on autentification, do I need to change anything else other than the plugin folder and dll, and the dll name in the assets file (Zorro S) ?








Attached File
vDukas1.1.JPG  (82 downloads)
Posted By: AndrewAMD

Re: Dukascopy plugin (yet another version) - 10/26/18 16:00

I don't use these plugins, no comment.
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 10/26/18 21:12

Originally Posted By: ags
Yes, got the vDukascopy-1.1

I'm getting those messages also with an IG Plugin, any idea waht this means?

!Command 45 not yet supported
!Command 43 not yet supported
!Command 172 not yet supported

Maybe a problem with the java?


These messages are not from vDukascopy-1.1 plugin!
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 10/26/18 21:16

Originally Posted By: ags
Hi AndrewAMD,

thank you for the comments about the messages.
Yes, I'm testing both of them, with similar results. Cmpared with the Oanda Live connection (not Java environment) the Dukascopy connection seams not so stable.

Now vDukascopy-1.1 generates otehr errors like the attached on autentification, do I need to change anything else other than the plugin folder and dll, and the dll name in the assets file (Zorro S) ?


Did you put your username and password in the configuration file?
Posted By: ags

Re: Dukascopy plugin (yet another version) - 10/30/18 18:20

I have 6 accounts in the accounts list. 2 from them live, but in reviewing I see you also have a config.yml file.
Will try with this one, have not seen that before, probably it is this...
Posted By: ags

Re: Dukascopy plugin (yet another version) - 10/30/18 19:02

Got it kvm, working now, no errors !!!

Sorry, my editor showed only parts of your README explanation...
(what editor are you using?)

Will let you know how it goes, just a few more test and going live.

Thank you again for the dll !!!
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 10/31/18 09:31

The username and password are placed in the config file, because that way you can use the plugin's UI to test different API calls directly, without interacting with Zorro:

Code:
java -jar vDukascopy-1.1.jar



Quote:
what editor are you using?

Notepad2
Posted By: ags

Re: Dukascopy plugin (yet another version) - 11/15/18 08:24

Hi kvm,
I'm testing almost 2 weeks the vDukascopy-1.1 plugin for a Dukascopy_Bank live account.

After a disconnection (I just disconnected Zorro but left the positions open, to actualize the account value that was also not actualized after a account deposit a few days ago) Zorro is not getting the open positions, it simply starts as you would have no open positions, but i see my open positions in the Dukascopy JForex platform, any idea?

I have changed the account leverage while there where open positions, could this have generated the coonflict and not recognition from open positions? Since in the log file, apparently the positions are recognized, but not shown in Zorro:

(today extract from the log file vDukascopy-log file, just put some xxx in my id and balance)

2018-11-15 07:59:18.429 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onAccount: [id=xxxxx, leverage=200.00, balance=xxxxx.xx EUR, tradeVal=-16.57, marginVal=193.57]

After a while looking at this I decided to close the positions in JForex and are asking if this problem is known before restarting Z12.

Any hint would be much appreciated.
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 11/15/18 14:31

I can't comment on how Z12 behaves, but Zorro saves all trades in Data/*.trd files. And after a disconnect it tries to resume them. You should see something like this in the message window:

Code:
TEST compiling...........
!OK: JVM initialized
Login 0 vDukascopy-1.2.. at UTC 11-15 14:22
!GBP/USD: 1.27997 0.00012 1
Trade: TEST GBP/USD 2018-11-15
[GBP/USD::L9184] - resumed (1 lots)



and here is the test script:

Code:
function run() {
  LookBack = 0;
  BarPeriod = 5;
  if(Bar == 1) enterLong();
}

Posted By: ags

Re: Dukascopy plugin (yet another version) - 11/16/18 07:20

Hi kvm,

sorry, i have to express my question a little different, more positive.

During the 2 weeks period live with vDukascopy-1.1 i disconnected and reconnected a few times without any problem, all open trades where resumed perfectly.

It was only the last time that Zorro wasn't finding the open positions and did not resumed the trades, i guess because i changed the leverage of the account having open positions, but i'm not sure why.

Nevertheless, after closing all positions manually in JForex, yesterday i started Z12 again in Dukascopy and it continues working good.

I just get some communication messages from the API a few times during the day, also during the two weeks period it was connected like these:

!ERROR Primary session ping failed: java.until.concurrent.TimeoutException: [DDS2 Standalone Transport Client] Timeout while waiting for response, 10000, syncRec...

!ERROR Secondary session (and the same as with Primary)...

!ERROR An existing connection was forcibly closed by the remote host java.io.IOException: An existing connection was forcibly closed by the remote host.

But never got "operative" problems, all runs continuosly but just get these messages a few times during the day, any idea why ?? Can i just ignore them??

Thanks again for the plugin, testing live in the 3rd week.
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 11/16/18 08:45

Hi ags,

1. I guess when Zorro detects certain account changes, like id or leverage, it can't resume the trades. But this is just a guess. Maybe someone on Zorro side can explain and clarify this.

2. These specific error messages can be ignored. They indeed indicate some connection issues, but dukascopy library handles them internally and reconnects if needed.

P.S.: I'm testing Z7 for about a week and I haven't noticed any problems so far. The balance is increasing, but this is just a demo!
Posted By: ags

Re: Dukascopy plugin (yet another version) - 11/16/18 11:41

Hi kvm,

although I discovered Zorro just 2 Months ago, based on my trading experience (4 years) and all the other platforms, systems and nonsense I have seen, I trust the system (and your plugin!) to go live already with Z12 till I can get my own strategy translated into Zorro.

Just having some hard time to translate my own strategy now, and to understand the vast possibilities Zorro gives you, awesome !!

Will let you know how the live experience with Dukascopy progresses, will change to the new release as soon as it is "officially approved".
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 11/16/18 13:14

Hi ags,

Here are some thoughts you might find useful. Yes, Zorro is a genius tool for testing strategies. But in a long term I would prefer to port my strategy to Java and execute it directly inside the JForex environment. No more OS limitations, simplified execution - no dll calls, third party plugins etc.
Posted By: ags

Re: Dukascopy plugin (yet another version) - 11/23/18 14:31

Hi kvm,

for that i need to learn a lot of Java... for the time being is only a link language for me...

Would be interesting since i really get some stability problems. In my 4th week live trading with Z12 in Dukascopy i got some disturbing connectivity issues.
At some point i desconnected Z12 having open trades (dieconnected without closing the trades of course), and at reconnection the open trades were found and reconnected, no problem.
At other 2 experiences and after some weird disconnection Zorro reconnected but did not found the old trades, which is fundamental for Z12 kind of longer time period trades scripts. I had to close them manually from the JForex platform from Dukascopy.

I'm attaching the log fle from today only, you may see the error messages and that 2 trades where open. Then wen reconnecting Zorro was unable to find the open trades.

Any idea ??

By the way, I'm connecting Zorro from an EC2 AWS instance, that also gives me some troubles from time to time it kind of freezes speed, getting really really slow... could this be a problem?

I also tried to reconnect from my PC but got the same result, Zorro startet trading without finding the open trades...

Attached File
vDukascopy-log.txt  (54 downloads)
Posted By: ags

Re: Dukascopy plugin (yet another version) - 11/24/18 09:33

Originally Posted By: ags


I also tried to reconnect from my PC but got the same result, Zorro startet trading without finding the open trades...



For this pat at least, i understand zorro stores the open trades in files Data/*.trd; and read these files to resume trades. So if you have a breackdown or try to resume from another environment it won't work because it does not has the information on open trades...
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 11/26/18 09:35

Originally Posted By: ags
Hi kvm,

for that i need to learn a lot of Java... for the time being is only a link language for me...

Would be interesting since i really get some stability problems. In my 4th week live trading with Z12 in Dukascopy i got some disturbing connectivity issues.
At some point i desconnected Z12 having open trades (dieconnected without closing the trades of course), and at reconnection the open trades were found and reconnected, no problem.
At other 2 experiences and after some weird disconnection Zorro reconnected but did not found the old trades, which is fundamental for Z12 kind of longer time period trades scripts. I had to close them manually from the JForex platform from Dukascopy.

I'm attaching the log fle from today only, you may see the error messages and that 2 trades where open. Then wen reconnecting Zorro was unable to find the open trades.

Any idea ??

By the way, I'm connecting Zorro from an EC2 AWS instance, that also gives me some troubles from time to time it kind of freezes speed, getting really really slow... could this be a problem?

I also tried to reconnect from my PC but got the same result, Zorro startet trading without finding the open trades...


Hi ags,

Examining the log shows several timeout issues which can be releated with EC2 AWS slowliness, but the thing that bothers me the most is "OutOfMemoryError: unable to create new native thread".

This means that Java VM is out of resources (threads) so it may hang and become unresponsive and it is due to unfreed resources inside the Dukascopy JForex library:

[DDS2 Standalone Transport Client] Event did not execute in timeout time [1000] and is still executing, CRITICAL EXECUTION WAIT TIME: 5453ms, possible application problem or deadLock

The only thing that I can do is to keep the plugin in sync with the latest version of the library and hope the bugs will be fixed then.

And one more thing: the best way to restart the plugin is to restart the Zorro itself, i.e the Java VM will be restarted too.
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 11/26/18 09:44

Originally Posted By: ags
Originally Posted By: ags


I also tried to reconnect from my PC but got the same result, Zorro startet trading without finding the open trades...



For this pat at least, i understand zorro stores the open trades in files Data/*.trd; and read these files to resume trades. So if you have a breackdown or try to resume from another environment it won't work because it does not has the information on open trades...


Exactly!

I hope to start using the plugin next week with a real account, so you won't be a single tester anymore.
Posted By: ags

Re: Dukascopy plugin (yet another version) - 11/26/18 12:21

Hi kvm,

thank you for your efforts with the plugin, let's try to collaborate to get this done!

Since yesterday and with the idea to break down issues, i actually have two Z12 Zorro instances working on two different live accounts from Dukascopy, in two different AWS instances.

#1 in a T2.micro instance, the one you already got the log file
#2 in a M3.medium instance, which has a complete different profile and should cope with 10 Zorros simultaniusly (at least).

Just according to Murphy, today I got some troubles with the M3.medium isntance as follows:

Weekend ends on 25.11. 23:00
[677: Mon 18-11-26 00:22] 11174.54/11227.7911174.54/11203.59 -6.18
[678: Mon 18-11-26 04:22] 11203.59/11242.0911200.49/11238.89 -6.18
[679: Mon 18-11-26 08:22] 11238.89/11339.4211234.99/11332.39 -1.48
Enter 1L UK100 Stop 568.7 Trail 568.7 at 08:22:01
{UK100:HU:l7901} Long 1@7024.03 Risk 627 ts at 08:22:01
Stop 6455 Trail 7593 TP 0.0 Com 0000 Mrg 0000 Net 0
Enter 1L UK100 Stop 0.25747 at 08:22:01
!ERROR java.util.concurrent.ExecutionException: com.dukascopy.api.JFException: state is CANCELED

Caused by: com.dukascopy.api.JFException: state is CANCELED


!java.util.concurrent.ExecutionException
!com.dukascopy.api.JFException: state is CANCELED
Error 075: (UK100:NET:L) - can't open 1@7024 Stop 1756 at 08:22:01
UK100 Pool: 0 Virtual: 1


I'll give you all messages i get from the plugin from these two different instances. Hopefully this helps you in the development.

According the jcl's team, they have good experience with 3 Zorro instances working on a T2.micro, but not with Dukascopy and not with a java based plugin I suppose.
Posted By: ags

Re: Dukascopy plugin (yet another version) - 11/26/18 12:50

An here the vDukascopy-log file:

(the position was opened an hour later, allthough going long in the UK market these days is really interesting ;-)


Attached File
vDukascopy-log.txt  (48 downloads)
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 11/26/18 13:43

Originally Posted By: ags
An here the vDukascopy-log file:

(the position was opened an hour later, allthough going long in the UK market these days is really interesting ;-)


Hi ags,

The message response ORDER_FILL_REJECTED is sent by the server if for some reason the order fill was not filled. I guess the problem here is that the MAX SLIPPAGE 0.05 was exceeded. But this is just a guess, because there is no detailed information coming back from the server - Text: null;

You can check out the order submission process at: Market Order with Slippage
Posted By: ags

Re: Dukascopy plugin (yet another version) - 11/26/18 15:48

Hi kvm,

Thank you for the information.

indeed, i was reading carefully the log file and understand the same as you have expressed before.

No plugin problem here.

The other Z12 i have in the t2.micro instance runs only forex assets at 1:200 leverage (CFDs only up to 1:100), no issue today and till now since market opening midnight.

Keep you posted.
Posted By: maji

Re: Dukascopy plugin (yet another version) - 11/27/18 00:29

hi is this version support cfd and stock?
Posted By: ags

Re: Dukascopy plugin (yet another version) - 11/27/18 17:11

Hi kvm,

Got two timeout error messages today, one in #1 T2.micro and a similar one in #2 M3.medium.
This would imply we probably have a problem with the plugin, since the M3.medium has a much bigger capacity than T2.micro, and capacity problem would not be the case.

Below the log files, any ide what the issue could be?

Interestingly to note: both ERROR messages started at the same time 20:12.08 and 20:12.09.
Note that these are two different accounts, running in two different instances.



Attached File
T2-micro_vDukascopy-log.txt  (33 downloads)
Attached File
M3-medium_vDukascopy-log.txt  (67 downloads)
Posted By: ags

Re: Dukascopy plugin (yet another version) - 11/29/18 10:15

Hi kvm,

Yesterday had no messages from any of the instances, all OK and working smoothly.
Today another cancelled order, don't get the point why, but was not a communication error. A miliseccond later another order was accepted, allthough in a Forex market.

Here the log-file.

Attached File
T2.micro_vDukascopy-log.txt  (40 downloads)
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 11/29/18 12:26

Hi ags,

Could you check your Activity Log in Reports page, to see if there is an additional information regarding the cancellation?
Posted By: ags

Re: Dukascopy plugin (yet another version) - 11/29/18 16:41

Hi kvm,

this is the log from the Z12_real file, no info on the DEU.IDX/EUR (DAX) to see there:

[Thu 18-11-29 08:10] 11636 0 +38.58 ////\ 11379.94/11385.6911357.09/11371.09 -1.18
[Thu 18-11-29 12:10] 11636 0 +38.58 ////\ 11381.59/11405.0911346.59/11367.24 -1.18

[Thu 18-11-29 12:10] 11672 0 +77.07 /////\ 11339.42/11339.4211277.12/11309.59 -1.18
[Thu 18-11-29 16:10] 11739 0 +134 /////\ 11309.59/11355.2511276.69/11310.53 -1.18
Enter 1S AUD/USD Stop 0.034307 Trail 0.034307 at 16:10:01
{AUD/USD:CY:s9901} Short 10@0.731740 Risk 303 ts Bid 0.731640 at 16:10:01
Stop 0.76605 Trail 0.69743 TP 0.0 Com 0000 Mrg 0000 Net 0
Enter 10S AUD/USD Stop 0.25238 at 16:10:01
[AUD/USD:NET:S3000] Short 10@0.731740 Pool Bid 0.731640 at 16:10:01

Or what do you mean with Reports page?
Posted By: ags

Re: Dukascopy plugin (yet another version) - 11/29/18 16:50

This is the Trade Log from Dukascopy:

29.11.2018 08:22:01 Order #487605249, Position #108477463
SELL 1.00 DEU.IDX / EUR REJECTED

29.11.2018 08:22:01 Order #487605250, Position #108477463
BUY 1.00 DEU.IDX / EUR SL ask > 14222.98 CANCELLED

The asset is not the problem, since there are two short positions open with this asset since a few days. This would be the third short position with this asset.
Posted By: ags

Re: Dukascopy plugin (yet another version) - 11/29/18 17:44

Originally Posted By: ags
Hi kvm,

Got two timeout error messages today, one in #1 T2.micro and a similar one in #2 M3.medium.
This would imply we probably have a problem with the plugin, since the M3.medium has a much bigger capacity than T2.micro, and capacity problem would not be the case.

Below the log files, any ide what the issue could be?

Interestingly to note: both ERROR messages started at the same time 20:12.08 and 20:12.09.
Note that these are two different accounts, running in two different instances.




For this one I got following answer from Dukascopy:

"Hello.

We have found that the reasons of that Exceptions is the loss of connection to Dukascopy servers.
This can happen only when SDK client looses internet connection.

Kind regards, Support Team."

That would mean that AWS Server lost internet connection ???
I guess this was a problem at Dukascopy Serever connection than the AWS server...
Good news, has nothing to do with the Plugin !!
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 11/30/18 08:26

Hi ags,

I've experienced a lot of timeouts when testing it against the demo servers and it would be a little bit frustrating if the connection problem persists in the live environment too.

I'm waiting my live account to be fully confirmed and will test my installation against the live servers.
Posted By: ags

Re: Dukascopy plugin (yet another version) - 11/30/18 10:26

Hi kvm,

excellent!
Are you connecting from a home internet connection? If so, that could be the problem. From AWS you can get a T3.micro free for one year. (don't open two instances in the free tier, that gave me a lot of problems...).

This week I only got the timeouts mentioned before, on both accounts at the same time... very strange. But both accounts reconnected just a few minutes later.
I also disconnected, migrated to Zorro 1.96 plus new Z12 parameters and had no inconvenient. All working now.
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 12/04/18 13:30

Hi ags,

I've already tested a t2.micro instance in US-East availability zone, but the response time is worse: 32ms (t2.micro) vs. 26ms (my computer). Now I'll setup an instance in EU zone to see if there is any difference.

What is your response time when you "ping platform.dukascopy.com" from your instance?
Posted By: ags

Re: Dukascopy plugin (yet another version) - 12/04/18 17:35

Hi kvm,

how are you doing the test, from a browser in the instance? which one to perform the same.
I also had some strange response when firstly installed Zorro on a Ohio zone. Now i have the two instances in Frankfurt and it works much much better, no problem at all actually.

By the way, no communication errors since the small incidents last week. The two Zorros in the two different instances are working without interruption.
I put weekend to 3+4 and got no problems at the weekend either.
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 12/05/18 08:22

No, I run the command through the command prompt (cmd.exe):

ping platform.dukascopy.com

and, yes, the Frankfurt zone rules with response time of 1ms laugh The reason of that is because IP location shows that the Dukascopy servers are in Prague.
Posted By: ags

Re: Dukascopy plugin (yet another version) - 12/06/18 17:22

Ok, yes, doing it in that way i also get 1ms from both instances in Frankfurt.
From my computer the latency is 10 to 23 ms.

But i think the problem if you connect from home is not the latency but the possible interruptions you get in a home internet connection.
AWS has another priority which gives all instances a much higuer availability and reliability compared to home connections.
The only other comparable connection is a server room.

Good gains this week, Zorro got the USD/CAD movement since yesterday perfectly.
No problems at all from the plugin.

I'm really wondering... but i guess it was the operator playing around with configurations... not the plugin which works very good.


Posted By: ags

Re: Dukascopy plugin (yet another version) - 12/11/18 13:13

Hi kvm,

Got again this OutOfMemory erroer, just like the one 2-3 weeks ago.
This one is from #2 T2.micro instance. #1 M3.medium continues without problem till now.

System Start was 29.11. No problem till today. With this error Zorro was disconnected and unable to connect again automatically.

I disconnected and started Zorro again. Ongoing trades were resumed and it works again, but has no history of the last 2 weeks, so equity curve trading, OptimalF and CBI calc need to restart, which is not good for a long term Z strategy.

Any idea how to resolve this?

Attached File
vDukascopy-log.txt  (35 downloads)
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 12/11/18 14:43

Hi ags,

I'm testing it with my real account for only one week till now and so far there is no problems. This error can be due to memory depletion on OS or JVM levels, so when the problem reproduces I'll try to fully analyze the situation on my instance: t2.micro (Windows Server 2016) with 1GB of RAM.
Posted By: ags

Re: Dukascopy plugin (yet another version) - 01/03/19 10:45

Hi kvm,

how is it going with your live experience?

I got an orphan position with one of the accounts. Zorro closed a GER30 position and the broker rejected the trade, this was reflected in the log file, but the position desapeared from Zorro and remained in the Broker, Dukascopy.

Here the relevant log:


2018-12-31 09:20:00.350 INFO [main ] c.m.v.d.DukascopyPlugin - brokerCommand: SET_ORDERTYPE=0
2018-12-31 09:20:00.354 INFO [main ] c.m.v.d.DukascopyPlugin - brokerSell: tradeID=110304062, amount=1
2018-12-31 09:20:00.388 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: ORDER_CLOSE_REJECTED; Text: VALIDATION_ERROR-Your order has been rejected due to validation failure. Instrument DEU.IDX/EUR is non tradable; Related Order: [DukascopyPlugin1544444400415]-FILLED / DEU.IDX/EUR / 10735.270668 / 1.0E-6 / 1.0E-6
2018-12-31 09:20:00.388 INFO [main ] c.m.v.d.DukascopyPlugin - brokerSell: tradeID=110304062, amount=1, order=[DukascopyPlugin1544444400415]-FILLED / DEU.IDX/EUR / 10735.270668 / 1.0E-6 / 1.0E-6
2018-12-31 09:20:05.549 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onAccount: [id=75192, leverage=100.00, balance=10854.42 EUR, tradeVal=299.66, marginVal=989.55]

Just managed the position from the Broker platform (JForex).

Have you experienced something similar or a disconnection as i had experienced before?
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 01/03/19 13:10

Hi ags,

Yes, you found a bug in brokerSell method. It doesn't return the correct error code in case of a failure.

Probably next week I will release a new version of the plugin with this fixed.
Posted By: ags

Re: Dukascopy plugin (yet another version) - 01/03/19 14:26

Excellent !!
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 01/07/19 13:59

New Dukascopy plugin version 1.2 is available:

- Updated Dukascopy JForex API to version 3.4.6
- Fixed bug in brokerSell method not returning error
- Now you can enter your credentials from Zorro window
- Tested with Zorro v1.96.4 using Z7 and Z12 strategies
Posted By: ags

Re: Dukascopy plugin (yet another version) - 01/07/19 16:58

Hi kvm,

just downloaded the new version.
Will run it in one account and let you know how it goes.

This new version surely resolves the orphan position case, but does it also resolves the OutOfMemory issue we experienced before? Have you also seen this or is it related to my overall system?
Posted By: ags

Re: Dukascopy plugin (yet another version) - 01/07/19 17:09

Hi kvm,

just noticed that the config.yml file is connecting the live account to:

url: http://platform.dukascopy.com/live/jforex.jnlp

and Dukascopy is recommending to use this one:

url: http://platform.dukascopy.com/live_3/jforex_3.jnlp

See explanation here

https://www.dukascopy.com/wiki/en/development/get-started-api/use-jforex-sdk/live-mode

The connection is working on both directions, any idea what the difference could be?
Posted By: ags

Re: Dukascopy plugin (yet another version) - 01/08/19 08:13

Hi kvm,

re-connected yesterday with the new plugin version you kindly provided (Thanks a lot again!)

Got following messages today in the morning, after that the system remained connected and is working propperly. Any idea?

Attached the relevant log file:

Attached File
vDukascopy-log.txt  (28 downloads)
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 01/08/19 09:56

Originally Posted By: ags
This new version surely resolves the orphan position case, but does it also resolves the OutOfMemory issue we experienced before? Have you also seen this or is it related to my overall system?

I've not experienced the OutOfMemory issue, but acctually I've not tested it with Z12, like you did.

Originally Posted By: ags
The connection is working on both directions, any idea what the difference could be?

I think they are the same. They recommend to change the connection url to http://platform.dukascopy.com/live_3/jforex_3.jnlp, but in the code example below the live address is:

Code:
// url of the LIVE jnlp
private static String jnlpUrl = "http://platform.dukascopy.com/live/jforex.jnlp";



Originally Posted By: ags
Got following messages today in the morning, after that the system remained connected and is working propperly. Any idea?

This exception indicates that the given communication channel was closed, for instance if the connection was reset by the server or a proxy.
Posted By: ags

Re: Dukascopy plugin (yet another version) - 01/08/19 15:28

Hi kvm,

thank you for the information.
Here the answer I got from Dukascopy re the url version:

"Hello.
/live/jforex.jnlp is the old version of JFprex platform.
Please use /live_3/jforex_3.jnlp for the current 3 ver.
Kind regards, Support Team."
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 01/09/19 08:08

Thanks ags,

the new URLs will be included in upcoming versions.
Posted By: ags

Re: Dukascopy plugin (yet another version) - 01/09/19 08:36

Thank you kvm,

I changed it directly in the config.yml, so i'm testing it live already.
Will let you know how it works, till now no issues.
Posted By: ags

Re: Dukascopy plugin (yet another version) - 01/11/19 14:38

Hi kvm,

here another disconnect:

OutOfMemoryError: unable to create new native thread

Here the relevant log file:

Attached File
vDukascopy-log.txt  (20 downloads)
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 01/11/19 14:47

Hi ags,

this is still the old version 1.1. I'm pretty sure the problem lies in JForex library, the new version 1.2 of the plugin uses newer version of the library which may behave differently.
Posted By: ags

Re: Dukascopy plugin (yet another version) - 01/11/19 14:48

Hi kvm,

yes, this was the seccond account that was running without problem since november. Will change the plugin here too and see.
Posted By: ibne

Re: Dukascopy plugin (yet another version) - 01/11/19 15:14

Hi kvm,

I wanted to download tick data with the Download.c script, but then the plugin keeps freezing.
Might be an implementation problem...
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 01/12/19 07:07

Could you post the log here?
Posted By: ibne

Re: Dukascopy plugin (yet another version) - 01/12/19 08:00

Plugin log.
This time I got exceptions.
But last time plugin just stopped/freezed.

Attached File
vDukascopy-log.txt  (30 downloads)
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 01/12/19 08:23

This error comes from the API. I can't test it right now, so could you please clear the JForex cache and try it again.
Posted By: ibne

Re: Dukascopy plugin (yet another version) - 01/12/19 08:40

I know that the API from Dukascopy is very unstable regarding .cache and IHistory.
All I can say is that my plugin downloads the data fine, so probably you are using different API methods.

I now also tested tick downloading with Download.c(see attachment)
Here Java Heap space error occures.
My plugin runs here fine; you might want to have a look the source code for comparison.

Attached File
vDukascopy-log.txt  (26 downloads)
Posted By: ags

Re: Dukascopy plugin (yet another version) - 01/12/19 10:28

Hi kvm,

got a few error messages on weekend with the V1.2 These are new, i had not seen these with V1.1.
The system remains connected, so it is apparently just a communication error again.
I have a Z12 with Weekend = 3+4 here.
Here the Zorro log:

{USD/CAD:VO:s1202} Trail 6@1.34860 Stop 1.34347 at 16:07:00
Weekend on 11.01. 20:00.
!ERROR [DDS2 Standalone Transport Client] Event did not execute in timeout time [1000] and is still executing, CRITICAL EXECUTION WAIT TIME: 1004ms, possible application problem or deadLock, message [<InstrumentStatusUpdateMessage(instrument=EUR/USD,state=TRADING_TEMPORARY_BLOCKED,timestamp=15472626]
!ERROR [DDS2 Standalone Transport Client] Event execution took 14246ms, critical timeout time 1000ms, possible application problem or deadLock, message [<InstrumentStatusUpdateMessage(instrument=EUR/USD,state=TRADING_TEMPORARY_BLOCKED,timestamp=15472626]
!ERROR [DDS2 Standalone Transport Client] Event did not execute in timeout time [1000] and is still executing, CRITICAL EXECUTION WAIT TIME: 1001ms, possible application problem or deadLock, message [<InstrumentStatusUpdateMessage(instrument=XAG/USD,state=TRADING_TEMPORARY_BLOCKED,timestamp=15472626]
!ERROR [DDS2 Standalone Transport Client] Event execution took 6295ms, critical timeout time 1000ms, possible application problem or deadLock, message [<InstrumentStatusUpdateMessage(instrument=XAG/USD,state=TRADING_TEMPORARY_BLOCKED,timestamp=15472626]
!ERROR [DDS2 Standalone Transport Client] Event did not execute in timeout time [1000] and is still executing, CRITICAL EXECUTION WAIT TIME: 1002ms, possible application problem or deadLock, message [<InstrumentStatusUpdateMessage(instrument=EUR/USD,state=TRADING_TEMPORARY_BLOCKED,timestamp=15472627]
!ERROR [DDS2 Standalone Transport Client] Event execution took 12884ms, critical timeout time 1000ms, possible application problem or deadLock, message [<InstrumentStatusUpdateMessage(instrument=EUR/USD,state=TRADING_TEMPORARY_BLOCKED,timestamp=15472627]


Here the API relevant log file:

Attached File
vDukascopy-log.txt  (27 downloads)
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 01/14/19 08:45

Originally Posted By: ags
Hi kvm,

got a few error messages on weekend with the V1.2 These are new, i had not seen these with V1.1.


I guess that some timeout somewhere in the JForex library has been exceeded.
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 01/14/19 11:37

Originally Posted By: ibne
Hi kvm,

I wanted to download tick data with the Download.c script, but then the plugin keeps freezing.
Might be an implementation problem...

Hi ibne,

I've tested this scenario and was able to download several years of M1 data. I wish to be able to test it in tick mode also, but I don't have Zorro S license.

Freezing and memory errors could be fixed with increasing the java heap size, just set the environment variable _JAVA_OPTIONS="-Xms256m -Xmx512m", for example.
Posted By: ibne

Re: Dukascopy plugin (yet another version) - 01/14/19 11:47

Hi kvm,

ah, I forgot that TICK based download is only for Zorro S...nervemind laugh
Posted By: ags

Re: Dukascopy plugin (yet another version) - 01/14/19 12:29

Hi kvm,

got another situation with the new plugin in one account. The other one works fine untill now.
Zorro disconnected this morning at 9:00 CET. The log files are still writing events, even 4 hours later, but htere is no connection from Zorro (red square indicator).

No idea what this is.
Attached the log files from zorro and the dll:

Attached File
vDukascopy-log.txt  (24 downloads)
Attached File
Z12_real.txt  (27 downloads)
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 01/14/19 12:42

Hi ags,

I guess the disconnection didn't close all the channels and the client keeps receiving account events.

Maybe the new version 3.4.6 of the API introduces more problems than fixes.

I'll shortly release a new version of the plugin using the latest API version 3.4.13 from Dukascopy.
Posted By: ags

Re: Dukascopy plugin (yet another version) - 01/15/19 14:07

Hi kvm,

I have to remark that the other instance which has only one Zorro is working without interruption since 07.01.19 with vDukascopy-1.2.
Apparently AWS instances doesn't like two Zorros with different JAVA based plugins.

I was trying to find our if someone has experience with multiple JAVA based API plugin Zorros working in the same AWS instance, but have not seen any, so it's just my impression that AWS instances, or other systems, have problems with different JAVA APIs working in the same environment.
Posted By: ags

Re: Dukascopy plugin (yet another version) - 01/16/19 16:11

Hi kvm,

v1.2 works fine, the problem i had was apparently generated by a 2nd plugin i was using in the same instance.

No errors or communication problems seen in the few last days.

Keep you posted.
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 01/25/19 14:28

Hi all,

Do you have problems accessing your live accounts?

I'm always getting authentication error from both Zorro and JForex Web client while trying to login to my DukascopyBank live account!

Edit: Dukascopy chat - We apologize for such inconvenience, but we have some technical issues. Our best specialists are working hard in order to solve this as soon as possible.
Posted By: ags

Re: Dukascopy plugin (yet another version) - 01/25/19 17:37

Hi kvm,

yes, i'm too. They told me they have a problem with the servers... apparently not so trivial because it started non today, more than 4 hours already...

EDIT: now, 18:40 all works again.
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 01/25/19 19:25

Hi ags,

yes, now everything works again.
Posted By: ags

Re: Dukascopy plugin (yet another version) - 01/30/19 18:08

Hi kvm,

got an Order rejection after being accepted from a Standard Z12, but do not understand why.
being a Z12 it should not be a script error laugh

the position (NAS100) was ordered at 6714 with Stop=1678, but then you can see that the stop order was set to 6714-1678=5036 which is too far.

My best guess: there is a confusion with the PIP value, since all CFDs at dukascopy have a PIP value of 0.01 and not 1, so the stop loss order, having a factor 1.5 should be 16.78 x 1.5 = 25.17 basic points away, that is around 6714-25 = 6689 and not 5036, but i'm not sure here since Z12 tends to put the stops at the broker really far away...

Any idea from your side?


Here the log:


Attached File
30.01.19vDukascopy-log.txt  (27 downloads)
Posted By: ags

Re: Dukascopy plugin (yet another version) - 01/30/19 21:07

A few hours later, a similar order with the same asset and similar far away stop was filled OK.

No idea why the first one was rejected.
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 01/31/19 07:39

Hi ags,

There is no detailed reason why the first order was rejected, so we can only guess what happened.

But if the second attempt was successful, as you said, probably the problem is not the stop loss.

All brokerXxx() methods print their arguments as they were received from Zorro, i.e. the plugin was called with stop=1678.76 and in the manual it is described as this:

Code:
stop  Optional input, 'safety net' stop loss distance to the opening price, or 0 for no stop.



So in case of buy order (amount > 0), it should be subtracted from the order's opening price.
Posted By: ags

Re: Dukascopy plugin (yet another version) - 02/15/19 18:18

Hi kvm,

have two instances working live since 25.1 and 28.1. No problem at all besides the mentioned situation before that is surely not related to the plugin.

But i do experience some issues wen using the Download script to get historical data from the broker.

It works mostly fine, sometimes you get some errors and it downloads the data anyway...

Here the log file.
In the case you find something or need any other detailed information just let me know.

Attached File
vDukascopy-log.txt  (22 downloads)
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 02/21/19 10:21

New Dukascopy plugin v1.3 is available:

- Updated Dukascopy JForex API to latest v3.4.13
- Updated demo and live urls in config file
- Fixed history download issues
- Tested with Zorro v1.96.4
Posted By: ags

Re: Dukascopy plugin (yet another version) - 02/22/19 18:26

Nice job kvm, it works very good.

Tested the Download and it works perfectly, no issues.
One test instance also changed to v1.3 and working.
Will replace also in the live instances next week.

Thank you.
Posted By: ags

Re: Dukascopy plugin (yet another version) - 03/04/19 09:44

Hi kvm,

i'm just testing in DEMO mode v1.3 and often get similar timout errors at script trailing changes.
The timeout message is always: "REASON: can't change stop loss price more than 1 times per second"

how can i prevent this? It's not from the script, and it is not comming with v1.2 which is still very stable at trading mode, any idea?

Below the related log text.


2019-03-04 09:41:36.993 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: NOTIFICATION; Text: CONDITION_CHANGED-Position 167814409 STOP LOSS #644964825 price changed from 1330.34 to 1330.26; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:41:37.000 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: ORDER_CHANGED_OK; Text: ; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:41:37.001 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1330.26, order=[DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:41:57.965 INFO [Strategy] c.m.v.d.DukascopyPlugin - Watchdog: VER: 1.3D2019-02-21T09:58:23ZJFX3.4.13 | UP(2019-02-25T07:16:29Z): 10165m | CPU(2): -1% | THR(40): 37 | MEM(247/90): 56M
2019-03-04 09:41:57.971 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onAccount: [id=***97, currency=USD, leverage=100, equity=52067.94, balance=51575.29, tradeVal=492.65, marginVal=5683.88]
2019-03-04 09:42:12.724 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1330.19
2019-03-04 09:42:12.752 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: NOTIFICATION; Text: CONDITION_CHANGED-Position 167814409 STOP LOSS #644964825 price changed from 1330.26 to 1330.19; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:42:12.758 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: ORDER_CHANGED_OK; Text: ; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:42:12.758 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1330.19, order=[DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:42:13.047 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1329.91
2019-03-04 09:42:13.048 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: ORDER_CHANGED_REJECTED; Text: Order REJECTED: STOP LOSS BUY XAU/USD @MKT IF ASK => 1329.91 - Position #167814409, REASON: can't change stop loss price more than 1 times per second; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:42:23.049 ERROR [main ] c.m.vega.common.PluginBridge - VER: 1.0D2019-02-21T09:58:23Z | UP(2019-02-25T07:16:29Z): 10165m | CPU(2): -1% | THR(40): 37 | MEM(247/90): 53M
java.util.concurrent.TimeoutException: Timeout exceeded (sec): 10
at com.metakod.vega.common.PluginBase.waitTo(PluginBase.java:332)
at com.metakod.vega.dukascopy.DukascopyPlugin.brokerStop(DukascopyPlugin.java:373)
at com.metakod.vega.common.PluginBridge.brokerStop(PluginBridge.java:524)
2019-03-04 09:42:23.623 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1329.78
2019-03-04 09:42:23.643 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: NOTIFICATION; Text: CONDITION_CHANGED-Position 167814409 STOP LOSS #644964825 price changed from 1330.19 to 1329.78; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:42:23.648 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: ORDER_CHANGED_OK; Text: ; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:42:23.652 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1329.78, order=[DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:42:24.196 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1329.75
2019-03-04 09:42:24.197 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: ORDER_CHANGED_REJECTED; Text: Order REJECTED: STOP LOSS BUY XAU/USD @MKT IF ASK => 1329.75 - Position #167814409, REASON: can't change stop loss price more than 1 times per second; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:42:34.198 ERROR [main ] c.m.vega.common.PluginBridge - VER: 1.0D2019-02-21T09:58:23Z | UP(2019-02-25T07:16:29Z): 10166m | CPU(2): -1% | THR(40): 37 | MEM(247/90): 63M
java.util.concurrent.TimeoutException: Timeout exceeded (sec): 10
at com.metakod.vega.common.PluginBase.waitTo(PluginBase.java:332)
at com.metakod.vega.dukascopy.DukascopyPlugin.brokerStop(DukascopyPlugin.java:373)
at com.metakod.vega.common.PluginBridge.brokerStop(PluginBridge.java:524)
2019-03-04 09:42:34.770 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1329.64
2019-03-04 09:42:34.786 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: NOTIFICATION; Text: CONDITION_CHANGED-Position 167814409 STOP LOSS #644964825 price changed from 1329.78 to 1329.64; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:42:34.787 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: ORDER_CHANGED_OK; Text: ; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:42:34.787 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1329.64, order=[DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:42:34.788 INFO [Strategy] c.m.v.d.DukascopyPlugin - Watchdog: VER: 1.3D2019-02-21T09:58:23ZJFX3.4.13 | UP(2019-02-25T07:16:29Z): 10166m | CPU(2): -1% | THR(40): 37 | MEM(247/90): 63M
2019-03-04 09:42:34.793 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onAccount: [id=***97, currency=USD, leverage=100, equity=52137.60, balance=51575.29, tradeVal=562.31, marginVal=5683.15]
2019-03-04 09:42:37.725 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1329.62
2019-03-04 09:42:37.746 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: NOTIFICATION; Text: CONDITION_CHANGED-Position 167814409 STOP LOSS #644964825 price changed from 1329.64 to 1329.62; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:42:37.752 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: ORDER_CHANGED_OK; Text: ; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:42:37.752 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1329.62, order=[DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:42:46.412 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167766368, stop=1.1515
2019-03-04 09:42:46.433 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: NOTIFICATION; Text: CONDITION_CHANGED-Position 167766368 STOP LOSS #644702445 price changed from 1.1517 to 1.1515; Related Order: [DukascopyPlugin1551283200477]-FILLED / EUR/USD / 1.13855 / 0.033 / 0.033
2019-03-04 09:42:46.439 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: ORDER_CHANGED_OK; Text: ; Related Order: [DukascopyPlugin1551283200477]-FILLED / EUR/USD / 1.13855 / 0.033 / 0.033
2019-03-04 09:42:46.439 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167766368, stop=1.1515, order=[DukascopyPlugin1551283200477]-FILLED / EUR/USD / 1.13855 / 0.033 / 0.033
2019-03-04 09:42:51.959 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1329.59
2019-03-04 09:42:51.978 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: NOTIFICATION; Text: CONDITION_CHANGED-Position 167814409 STOP LOSS #644964825 price changed from 1329.62 to 1329.59; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:42:51.985 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: ORDER_CHANGED_OK; Text: ; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:42:51.986 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1329.59, order=[DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:42:53.612 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1329.47
2019-03-04 09:42:53.629 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: NOTIFICATION; Text: CONDITION_CHANGED-Position 167814409 STOP LOSS #644964825 price changed from 1329.59 to 1329.47; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:42:53.636 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: ORDER_CHANGED_OK; Text: ; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:42:53.637 INFO [Strategy] c.m.v.d.DukascopyPlugin - Watchdog: VER: 1.3D2019-02-21T09:58:23ZJFX3.4.13 | UP(2019-02-25T07:16:29Z): 10166m | CPU(2): -1% | THR(40): 37 | MEM(247/90): 53M
2019-03-04 09:42:53.637 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1329.47, order=[DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:42:53.642 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onAccount: [id=***97, currency=USD, leverage=100, equity=52153.25, balance=51575.29, tradeVal=577.96, marginVal=5682.89]
2019-03-04 09:42:53.912 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1329.44
2019-03-04 09:42:53.913 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: ORDER_CHANGED_REJECTED; Text: Order REJECTED: STOP LOSS BUY XAU/USD @MKT IF ASK => 1329.44 - Position #167814409, REASON: can't change stop loss price more than 1 times per second; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:43:03.914 ERROR [main ] c.m.vega.common.PluginBridge - VER: 1.0D2019-02-21T09:58:23Z | UP(2019-02-25T07:16:29Z): 10166m | CPU(2): -1% | THR(40): 37 | MEM(247/90): 60M
java.util.concurrent.TimeoutException: Timeout exceeded (sec): 10
at com.metakod.vega.common.PluginBase.waitTo(PluginBase.java:332)
at com.metakod.vega.dukascopy.DukascopyPlugin.brokerStop(DukascopyPlugin.java:373)
at com.metakod.vega.common.PluginBridge.brokerStop(PluginBridge.java:524)
2019-03-04 09:43:51.173 INFO [Strategy] c.m.v.d.DukascopyPlugin - Watchdog: VER: 1.3D2019-02-21T09:58:23ZJFX3.4.13 | UP(2019-02-25T07:16:29Z): 10167m | CPU(2): -1% | THR(40): 37 | MEM(247/90): 42M
2019-03-04 09:43:51.179 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onAccount: [id=***97, currency=USD, leverage=100, equity=52154.86, balance=51575.29, tradeVal=579.57, marginVal=5682.90]
2019-03-04 09:44:05.475 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1329.37
2019-03-04 09:44:05.494 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: NOTIFICATION; Text: CONDITION_CHANGED-Position 167814409 STOP LOSS #644964825 price changed from 1329.47 to 1329.37; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:44:05.496 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: ORDER_CHANGED_OK; Text: ; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:44:05.502 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1329.37, order=[DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:44:05.776 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1329.35
2019-03-04 09:44:05.776 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: ORDER_CHANGED_REJECTED; Text: Order REJECTED: STOP LOSS BUY XAU/USD @MKT IF ASK => 1329.35 - Position #167814409, REASON: can't change stop loss price more than 1 times per second; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:44:15.778 ERROR [main ] c.m.vega.common.PluginBridge - VER: 1.0D2019-02-21T09:58:23Z | UP(2019-02-25T07:16:29Z): 10167m | CPU(2): -1% | THR(40): 37 | MEM(247/90): 62M
java.util.concurrent.TimeoutException: Timeout exceeded (sec): 10
at com.metakod.vega.common.PluginBase.waitTo(PluginBase.java:332)
at com.metakod.vega.dukascopy.DukascopyPlugin.brokerStop(DukascopyPlugin.java:373)
at com.metakod.vega.common.PluginBridge.brokerStop(PluginBridge.java:524)
2019-03-04 09:44:17.944 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1329.1
2019-03-04 09:44:17.962 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: NOTIFICATION; Text: CONDITION_CHANGED-Position 167814409 STOP LOSS #644964825 price changed from 1329.37 to 1329.1; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:44:17.968 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: ORDER_CHANGED_OK; Text: ; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:44:17.969 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1329.1, order=[DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:44:18.505 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1329.01
2019-03-04 09:44:18.506 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: ORDER_CHANGED_REJECTED; Text: Order REJECTED: STOP LOSS BUY XAU/USD @MKT IF ASK => 1329.01 - Position #167814409, REASON: can't change stop loss price more than 1 times per second; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
2019-03-04 09:44:28.516 ERROR [main ] c.m.vega.common.PluginBridge - VER: 1.0D2019-02-21T09:58:23Z | UP(2019-02-25T07:16:29Z): 10167m | CPU(2): -1% | THR(40): 37 | MEM(247/90): 49M
java.util.concurrent.TimeoutException: Timeout exceeded (sec): 10
at com.metakod.vega.common.PluginBase.waitTo(PluginBase.java:332)
at com.metakod.vega.dukascopy.DukascopyPlugin.brokerStop(DukascopyPlugin.java:373)
at com.metakod.vega.common.PluginBridge.brokerStop(PluginBridge.java:524)
2019-03-04 09:44:31.605 INFO [Strategy] c.m.v.d.DukascopyPlugin - Watchdog: VER: 1.3D2019-02-21T09:58:23ZJFX3.4.13 | UP(2019-02-25T07:16:29Z): 10167m | CPU(2): -1% | THR(40): 37 | MEM(247/90): 51M
2019-03-04 09:44:31.611 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onAccount: [id=***97, currency=USD, leverage=100, equity=52176.64, balance=51575.29, tradeVal=601.35, marginVal=5682.61]
2019-03-04 09:44:33.283 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1328.98
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 03/05/19 09:57

Hi ags,

There are no major changes between the plugin's code in v1.2 and v1.3. The brokerStop() method is exactly the same as in v1.2. The only major difference is the version of the Dukascopy API (v3.4.6 vs v3.4.13). But there is one more thing actually, the script is calling the brokerStop() method twice per second, as you can see from the following snippet:

line 06 - brokerStop() first call at 12.724 sec
line 09 - brokerStop() first call ended ok
line 10 - brokerStop() second call at 13.047 sec
line 11 - REASON: can't change stop loss price more than 1 times per second

Code:
06. 2019-03-04 09:42:12.724 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1330.19
07. 2019-03-04 09:42:12.752 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: NOTIFICATION; Text: CONDITION_CHANGED-Position 167814409 STOP LOSS #644964825 price changed from 1330.26 to 1330.19; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
08. 2019-03-04 09:42:12.758 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: ORDER_CHANGED_OK; Text: ; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
09. 2019-03-04 09:42:12.758 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1330.19, order=[DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5
10. 2019-03-04 09:42:13.047 INFO [main ] c.m.v.d.DukascopyPlugin - brokerStop: tradeID=167814409, stop=1329.91
11. 2019-03-04 09:42:13.048 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: ORDER_CHANGED_REJECTED; Text: Order REJECTED: STOP LOSS BUY XAU/USD @MKT IF ASK => 1329.91 - Position #167814409, REASON: can't change stop loss price more than 1 times per second; Related Order: [DukascopyPlugin1551369601264]-FILLED / XAU/USD / 1315.362423 / 6.3E-5 / 6.3E-5



You can configure the Zorro to limit the requests per second with GET_MAXREQUESTS command. It is supported by the plugin, just put in your config.yml this line:

Code:
maxRequests: 1

Posted By: ags

Re: Dukascopy plugin (yet another version) - 03/06/19 13:46

Hi kvm,

Just made the suggested change. I'll let you know how it works.
Posted By: ags

Re: Dukascopy plugin (yet another version) - 03/08/19 14:32

Hi kvm,

apparently it was exaclty that, after adding maxRequests: 1 i have seen no other trouble.
This is an ongoing test wit my own trading script, so i'll investigate how to limit the requests with the script itself to avoid further troubles.
Posted By: ags

Re: Dukascopy plugin (yet another version) - 03/11/19 17:15

Group Support explained that i can also modify the script with either set MaxRequests, or set TickTime to > 1000 for limiting the requests.
Posted By: ags

Re: Dukascopy plugin (yet another version) - 03/11/19 17:23

Hi kvm,

i'm having another anomality i can not understand.
The script closes a position, the plugin informs oder is filled, then confirms Order_Close_OK and a few seconds later it losses the Order.

The position remains open in Zorro only, at the broker it is closed according to the confirmation Order_Close_OK, any idea?


(this is a DEMO account since i'm still working on the script)

2019-03-11 09:00:20.130 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onAccount: [id=***97, currency=USD, leverage=100, equity=54201.00, balance=53967.64, tradeVal=233.36, marginVal=3545.70]
2019-03-11 09:00:52.691 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: NOTIFICATION; Text: ORDER_FILLED-Order FILLED at 25350.569 (#646676240 STOP LOSS SELL 3 USA30.IDX/USD @ MKT IF BID <= 25351.25 EXPIRES: GTC) - Position #168186933; Related Order: [DukascopyPlugin1552273211035]-FILLED / USA30.IDX/USD / 25401.03 / 3.0E-6 / 3.0E-6
2019-03-11 09:00:52.697 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: ORDER_CLOSE_OK; Text: null; Related Order: [DukascopyPlugin1552273211035]-CLOSED / USA30.IDX/USD / 25401.03 / 3.0E-6 / 3.0E-6
2019-03-11 09:00:58.402 ERROR [main ] c.m.v.d.DukascopyPlugin - brokerTrade: Order not found for tradeID=168186933
2019-03-11 09:00:58.414 ERROR [main ] c.m.v.d.DukascopyPlugin - brokerTrade: Order not found for tradeID=168186933
2019-03-11 09:00:59.423 INFO [main ] c.m.v.d.DukascopyPlugin - brokerCommand: SET_ORDERTYPE=0
2019-03-11 09:00:59.428 INFO [main ] c.m.v.d.DukascopyPlugin - brokerSell: tradeID=168186933, amount=3
2019-03-11 09:00:59.428 ERROR [main ] c.m.v.d.DukascopyPlugin - brokerSell: Order not found for tradeID=168186933
2019-03-11 09:01:12.561 ERROR [main ] c.m.v.d.DukascopyPlugin - brokerTrade: Order not found for tradeID=168186933
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 03/12/19 06:17

Hi ags,

Could you attach the full log (starting from opening the order)?
Posted By: ags

Re: Dukascopy plugin (yet another version) - 03/12/19 07:28

Hi kvm,

it is the Position #168186933, it starts 2019-03-11 with this lines

2019-03-11 04:00:11.050 INFO [Strategy] c.m.v.d.DukascopyPlugin - Strategy.onMessage: Message Type: NOTIFICATION; Text: ORDER_ACCEPTED-Order ACCEPTED: #646676239 BUY 3 USA30.IDX/USD @ MKT MAX SLIPPAGE 0.05 - Position #168186933; Related Order: [DukascopyPlugin1552273211035]-CREATED / USA30.IDX/USD / 25401.03 / 3.0E-6 / 3.0E-6

Here the related log file:

Attached File
vDukascopy-log.txt  (23 downloads)
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 03/12/19 08:12

Hi ags,

Here is what happen from my view point:

1. The script opens a buy order with stoploss 201 points away from the price:
2019-03-11 04:00:11.035 - brokerBuy2: asset=USA30.IDX/USD, amount=3, stop=201.62, limit=0.0
2019-03-11 04:00:11.068 - brokerBuy2: tradeID=168186933, type=BUY, order=[DukascopyPlugin1552273211035]-FILLED / USA30.IDX/USD / 25401.03
where open price is 25401.03 and stoploss sell is at 25401.03-201.62=25199.41

2. The script moves the stoploss to 25351.25:
2019-03-11 05:00:07.232 - brokerStop: tradeID=168186933, stop=25351.25

3. The stoploss is triggered and the order is closed by the broker:
2019-03-11 09:00:52.691 - Strategy.onMessage: Message Type: NOTIFICATION; Text: ORDER_FILLED-Order FILLED at 25350.569 (#646676240 STOP LOSS SELL 3 USA30.IDX/USD @ MKT IF BID <= 25351.25 EXPIRES: GTC) - Position #168186933; Related Order: [DukascopyPlugin1552273211035]-FILLED / USA30.IDX/USD / 25401.03 / 3.0E-6 / 3.0E-6

4. The script is trying to close the order but it doesn't exist anymore:
2019-03-11 09:00:59.428 - brokerSell: tradeID=168186933, amount=3
brokerSell: Order not found for tradeID=168186933
Posted By: ags

Re: Dukascopy plugin (yet another version) - 03/12/19 17:17

Hi kvm,

yes, the plugin seems not to report to Zorro that the position was closed.

I contacted the support team and the asked me to check if the plugin properly reports closed positions.

"For this, thei idicated to use the TradeTest script. Open a position and then close it directly in the broker platform. Zorro should detect the closed position within a few seconds, or a minute the latest."

I did that and indeed just get the same error message as before:

!ERROR brokerTrade: Order not found for tradeID= xx

So it really seams that the plugin is not reporting to Zorro that the position was closed.
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 03/13/19 12:10

New Dukascopy plugin v1.4 is available:

- Fixed issue with externally closed orders not being reported
- Tested with Zorro v1.96.4
Posted By: hatten

Re: Dukascopy plugin (yet another version) - 04/16/19 19:28

Dear KVM,

Thank you for the Dukascopy plugin. I would like to use it, but fail to login to my account using the included GUI plugin tester. I suspect this is related to the pin that is normally required as second authorization in addition to the password.

How is this circumvented?

Other questions are:

1. Does this plugin automatically get the RollShort and RollLong values when switching to a certain asset just as the zorro plugin for MT4 and MT5 brokers does?

2. Is the multibroker functionality of zorro supported? In other words if I switch from an asset belonging to one broker to an asset from Dukascopy, does that work with this plugin assuming of couse the DUkascopy account is included in the Accounts.scv and the asset names are adapated properly and included in the Assets.csv?


Thanks for any assistance

Hatten
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 04/17/19 07:13

Hi Hatten,

Originally Posted By: hatten
Dear KVM,
Thank you for the Dukascopy plugin. I would like to use it, but fail to login to my account using the included GUI plugin tester. I suspect this is related to the pin that is normally required as second authorization in addition to the password.

I've intentionally not implemented PIN verification, because it contradicts to the principles of fully automated trading.
You can test the plugin with a demo account or you have to suppress PIN code verification for your live accounts.
On how to do this, please follow this link: https://www.dukascopy.com/wiki/en/forex-...r-live-accounts

Originally Posted By: hatten

1. Does this plugin automatically get the RollShort and RollLong values when switching to a certain asset just as the zorro plugin for MT4 and MT5 brokers does?


So far I've not figured out how to get the rolling rates via the API. You have to manually update the asset file, getting the rates from here:
https://www.dukascopy.com/swiss/english/cfd/cfd-overnight-policy

Originally Posted By: hatten

2. Is the multibroker functionality of zorro supported? In other words if I switch from an asset belonging to one broker to an asset from Dukascopy, does that work with this plugin assuming of couse the DUkascopy account is included in the Accounts.scv and the asset names are adapated properly and included in the Assets.csv?

Unfortunately, I can't comment on this because I don't have Zorro S license and can't test it.
Posted By: dh85

Re: Dukascopy plugin (yet another version) - 07/12/19 10:36

Dear KVM,

I received below error message in the Zorro log and would really appreciate your help in understanding / fixing it:

!ERROR [DDS2 Standalone Transport Client] Event did not execute in timeout time [1000] and is still executing, CRITICAL EXECUTION WAIT TIME: 1006ms, possible application problem or deadLock, message [ !ERROR [DDS2 Standalone Transport Client] Event execution took 1460ms, critical timeout time 1000ms, possible application problem or deadLock, message [ [Thu 19-07-11 04:11] 5216 +84.16 +133 10/0 1.12616/1.12809\1.12582/1.12768 -0.000020000

I already contacted Zorro support, but they forwarded me to you as the error would come from the plugin.

My setup is as follows:

Zorro S version 2.15.0
Plugin version 1.4
Java version 1.8.0_212

Many thanks in advance,
Daniel
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 07/13/19 11:04

Hi Daniel,

These specific error messages can be ignored. They are coming from the Dukascopy's library (DDS2) and indicate some connection issues (timeouts, server problems, etc.), but the library handles them internally and reconnects if needed.
Posted By: dh85

Re: Dukascopy plugin (yet another version) - 07/15/19 05:03

Great, thanks a lot
Posted By: j45p41

Re: Dukascopy plugin (yet another version) - 08/30/19 09:37

Hi,

many thanks for the development of this connector. I am trying to allow the IP address for the connector to bypass my VPN.

I have configured: 104.20.188.23.

is this the correct IP?

Thanks!
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 08/30/19 10:50

Hi,

IMO this is the IP of the primary domain (dukascopy.com), i.e. website, right?

But as you can see from the connector's configuration, it connects to a subdomain (platform.dukascopy.com) and its IP is the one you need to use.
Posted By: j45p41

Re: Dukascopy plugin (yet another version) - 08/30/19 11:01

Thanks KVM. I have tried both, must be a problem with windows when bypassing the VPN. I keep getting connection forcibly closed by broker.

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.55 35
13.224.227.62 255.255.255.255 192.168.1.1 192.168.1.55 36
104.20.188.23 255.255.255.255 192.168.1.1 192.168.1.55 36
127.0.0.0 255.0.0.0 On-link 127.0.0.1 331
127.0.0.1 255.255.255.255 On-link 127.0.0.1 331
127.255.255.255 255.255.255.255 On-link 127.0.0.1 331
172.17.12.176 255.255.255.240 On-link 172.17.12.177 5256
172.17.12.177 255.255.255.255 On-link 172.17.12.177 5256
172.17.12.191 255.255.255.255 On-link 172.17.12.177 5256
192.168.1.0 255.255.255.0 On-link 192.168.1.55 291
192.168.1.55 255.255.255.255 On-link 192.168.1.55 291
192.168.1.255 255.255.255.255 On-link 192.168.1.55 291
224.0.0.0 240.0.0.0 On-link 127.0.0.1 331
224.0.0.0 240.0.0.0 On-link 192.168.1.55 291
224.0.0.0 240.0.0.0 On-link 172.17.12.177 5256
255.255.255.255 255.255.255.255 On-link 127.0.0.1 331
255.255.255.255 255.255.255.255 On-link 192.168.1.55 291
255.255.255.255 255.255.255.255 On-link 172.17.12.177 5256
===========================================================================
Persistent Routes:
Network Address Netmask Gateway Address Metric
104.20.188.23 255.255.255.255 192.168.1.1 1
13.224.227.62 255.255.255.255 192.168.1.1 1

===========================================================================
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 08/30/19 11:48

Is your account real or demo? Because, you have to suppress PIN code verification for your live accounts, otherwise, the authentication fails.
On how to do this, please follow this link: https://www.dukascopy.com/wiki/en/forex-cfds/jforex/practices

Suppress PIN code verification for LIVE accounts
It is possible to disable PIN code verification upon login.
You require a static IP address (contact your internet service provider).
To register the IP address:
  • Login into your live trading platform.
  • Open the My Account report (Go to Account > My Account).
  • In Security Settings, click on IP registration and register your IP address.

Posted By: dh85

Re: Dukascopy plugin (yet another version) - 09/03/19 10:45

Dear kvm,

Many thanks again for your Dukascopy plugin. I have been trading with it live since about 1 month now and it's working really good.

Today, however, I noticed the following errors in the Zorro log and was therefore wondering whether you could help me understand the root cause.

Even though the error was reported, it seems like the XAU/USD order was executed successfully.

Quote
[XAU/USD:NET:L1841] Sell 1@1525.56: +15.35 Bid 1525.25 at 00:04:00
Opn 1509.90 Cls 1525.56 Spr 0.307000 Slp -0.00 Rol 0.00 Com 0.00 Net 1
!ERROR VER: 1.0D2019-03-13T11:44:11Z | UP(2019-07-22T04:37:41Z): 61646m | CPU(2): -1% | THR(41): 37 | MEM(247/79): 49M java.util.concurrent.ExecutionException: com.dukascopy.api.JFException: state is CANCELED
Caused by: com.dukascopy.api.JFException: state is CANCELED
!java.util.concurrent.ExecutionException
!com.dukascopy.api.JFException: state is CANCELED
Error 075: (XAU/USD:NET:S) - can't open 1@1526 Stop 381.4 at 00:04:00
XAU/USD Pool: 0 Virtual: -1

[Tue 19-09-03 04:04] 5601 +179 +533 14/8 1.09599/1.09599\1.09311/1.09351 -0.000030000
!ERROR VER: 1.0D2019-03-13T11:44:11Z | UP(2019-07-22T04:37:41Z): 61886m | CPU(2): -1% | THR(41): 37 | MEM(247/79): 56M java.util.concurrent.ExecutionException: com.dukascopy.api.JFException: state is CANCELED
Caused by: com.dukascopy.api.JFException: state is CANCELED
!java.util.concurrent.ExecutionException
!com.dukascopy.api.JFException: state is CANCELED
Error 075: (XAU/USD:NET:S) - can't open 1@1524 Stop 381.0 at 04:04:01
XAU/USD Pool: 0 Virtual: -1


Many thanks in advance,

Daniel
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 09/03/19 11:32

Hi Daniel,

These error messages come from the underlying library and are not very detailed. So it would be better if you show the full log.
Posted By: dh85

Re: Dukascopy plugin (yet another version) - 09/03/19 19:11

Hi kvm,

Please find below the log messages recorded in vDukascopy-log.txt:

Code
2019-09-03 00:04:00.274 INFO  [main    ] c.m.v.d.DukascopyPlugin        - brokerCommand: SET_ORDERTYPE=0
2019-09-03 00:04:00.274 INFO  [main    ] c.m.v.d.DukascopyPlugin        - brokerSell: tradeID=120481841, amount=1
2019-09-03 00:04:00.375 INFO  [Strategy] c.m.v.d.DukascopyPlugin        - Strategy.onMessage: Message Type: NOTIFICATION; Text: ORDER_ACCEPTED-Order ACCEPTED: #564405256 SELL 1 XAU/USD @ MKT - Position #120481841; Related Order: [DukascopyPlugin1566331440983]-FILLED / XAU/USD / 1509.901445 / 1.0E-6 / 1.0E-6
2019-09-03 00:04:01.260 INFO  [Strategy] c.m.v.d.DukascopyPlugin        - Strategy.onMessage: Message Type: NOTIFICATION; Text: ORDER_FILLED-Order FILLED at 1524.758 (#564405256 SELL 1 XAU/USD @ MKT)  - Position #120481841; Related Order: [DukascopyPlugin1566331440983]-FILLED / XAU/USD / 1509.901445 / 1.0E-6 / 1.0E-6
2019-09-03 00:04:01.261 INFO  [Strategy] c.m.v.d.DukascopyPlugin        - Strategy.onMessage: Message Type: ORDER_CLOSE_OK; Text: null; Related Order: [DukascopyPlugin1566331440983]-CLOSED / XAU/USD / 1509.901445 / 1.0E-6 / 1.0E-6
2019-09-03 00:04:01.261 INFO  [main    ] c.m.v.d.DukascopyPlugin        - brokerSell: tradeID=120481841, amount=1, order=[DukascopyPlugin1566331440983]-CLOSED / XAU/USD / 1509.901445 / 1.0E-6 / 1.0E-6
2019-09-03 00:04:01.266 INFO  [main    ] c.m.v.d.DukascopyPlugin        - brokerCommand: SET_ORDERTYPE=0
2019-09-03 00:04:01.266 INFO  [main    ] c.m.v.d.DukascopyPlugin        - brokerBuy2: asset=XAU/USD, amount=-1, stop=381.39, limit=0.0
2019-09-03 00:04:01.370 INFO  [Strategy] c.m.v.d.DukascopyPlugin        - Strategy.onMessage: Message Type: NOTIFICATION; Text: ORDER_ACCEPTED-Order ACCEPTED: #564405275 SELL 1 XAU/USD @ MKT MAX SLIPPAGE 0.05 - Position #120891325; Related Order: [DukascopyPlugin1567469041266]-CREATED / XAU/USD / 1525.265 / 1.0E-6 / 1.0E-6
2019-09-03 00:04:01.371 INFO  [Strategy] c.m.v.d.DukascopyPlugin        - Strategy.onMessage: Message Type: NOTIFICATION; Text: ORDER_ACCEPTED-Order ACCEPTED: #564405276 STOP LOSS BUY 1 XAU/USD @ MKT IF ASK  => 1906.655 EXPIRES: GTC - Position #120891325; Related Order: [DukascopyPlugin1567469041266]-CREATED / XAU/USD / 1525.265 / 1.0E-6 / 1.0E-6
2019-09-03 00:04:01.371 INFO  [Strategy] c.m.v.d.DukascopyPlugin        - Strategy.onMessage: Message Type: ORDER_SUBMIT_OK; Text: null; Related Order: [DukascopyPlugin1567469041266]-OPENED / XAU/USD / 1525.265 / 1.0E-6 / 1.0E-6
2019-09-03 00:04:02.025 INFO  [Strategy] c.m.v.d.DukascopyPlugin        - Strategy.onMessage: Message Type: ORDER_FILL_REJECTED; Text: null; Related Order: [DukascopyPlugin1567469041266]-CANCELED / XAU/USD / 1525.265 / 1.0E-6 / 1.0E-6
2019-09-03 00:04:02.028 ERROR [main    ] c.m.vega.common.PluginBridge   - VER: 1.0D2019-03-13T11:44:11Z | UP(2019-07-22T04:37:41Z): 61646m | CPU(2): -1% | THR(41): 37 | MEM(247/79): 49M
java.util.concurrent.ExecutionException: com.dukascopy.api.JFException:  state is CANCELED
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:206)
	at com.metakod.vega.common.PluginBase.waitTo(PluginBase.java:317)
	at com.metakod.vega.dukascopy.DukascopyPlugin.brokerBuy2(DukascopyPlugin.java:295)
	at com.metakod.vega.common.PluginBridge.brokerBuy2(PluginBridge.java:463)
Caused by: com.dukascopy.api.JFException:  state is CANCELED
	at com.dukascopy.api.impl.connect.PlatformOrderImpl.updated(PlatformOrderImpl.java:1969)
	at com.dukascopy.api.impl.execution.ScienceThreadPoolExecutor.runExceptTicksAndBars(ScienceThreadPoolExecutor.java:1034)
	at com.dukascopy.api.impl.connect.JFRunnableProcessor.waitForUpdate(JFRunnableProcessor.java:121)
	at com.dukascopy.api.impl.connect.JForexTaskManager.waitForUpdate(JForexTaskManager.java:667)
	at com.dukascopy.api.impl.connect.PlatformOrderImpl.waitForUpdate(PlatformOrderImpl.java:2072)
	at com.dukascopy.api.impl.connect.PlatformOrderImpl.waitForUpdate(PlatformOrderImpl.java:2051)
	at com.metakod.vega.dukascopy.DukascopyPlugin.lambda$brokerBuy2$7(DukascopyPlugin.java:292)
	at com.dukascopy.api.impl.execution.TaskCustom.call(TaskCustom.java:34)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at com.dukascopy.api.impl.execution.ScienceThreadPoolExecutor$Worker.runTask(ScienceThreadPoolExecutor.java:904)
	at com.dukascopy.api.impl.execution.ScienceThreadPoolExecutor$Worker.run(ScienceThreadPoolExecutor.java:926)
	at java.lang.Thread.run(Thread.java:748)
Posted By: kvm

Re: Dukascopy plugin (yet another version) - 09/04/19 07:05

Hi Daniel,

Unfortunately I can't figure out from this snipped why the order was rejected. To get more detailed information don't hesitate to contact the Dukascopy's support. They will investigate what happened with this order.
© 2019 lite-C Forums