Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

Cannot send Python message via socket to Dukascopy Jforex Java strategy
 Post subject: Cannot send Python message via socket to Dukascopy Jforex Java strategy Post rating: 0   Post Posted: Wed 01 Feb, 2017, 03:29 
User avatar

User rating: 0
Joined: Sat 28 Jan, 2017, 01:31
Posts: 5
Location: Canada, Toronto
HI there I am trying to use a Python client to send a 'buy' message to Java strategy found in my Dukascopy JForex demo account. This Java socket strategy was found here

https://www.dukascopy.com/wiki/en/devel ... connection

I am able to get both Java JForex strategy code working with client Java code with no issue. When I try to do the same with Python, there is no connection for some reason. Here is the modified Python code:

#https://stackoverflow.com/questions/7749341/very-basic-python-client-socket-example

import socket

clientsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
clientsocket.connect(('localhost', 7001))
clientsocket.send('BUY')
clientsocket.close()


Question is what do you think is wrong? I can only think of is what parameters I use to set up the socket connection. Please let me know what you think. Thanks

Further info:

Everything is local. I can test to see if the connection is refused from within my Python client. I am also on macOS latest version. As for the test of Java test client with a JForex Java strategy, I was able generate an order as expected in the Dukascopy wiki link above.
Thanks


 
 Post subject: Re: Cannot send Python message via socket to Dukascopy Jforex Java strategy Post rating: 0   Post Posted: Mon 06 Feb, 2017, 15:03 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
In this forum we try to focus on JForex API issues.
It is possible to to request external programmer to implement a strategy or indicator for you:
https://www.dukascopy.com/fxcomm/member ... am_service


 

Jump to:  

  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com