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.

Order Messages from another Client process in account
 Post subject: Order Messages from another Client process in account Post rating: 0   New post Posted: Wed 06 Nov, 2013, 16:06 
User avatar

User rating: 98
Joined: Mon 23 Jul, 2012, 02:02
Posts: 656
Location: United States, Durham, NC
In my standalone client API process, I get these messages printed from
trading actions of a different API client process in the same account.

Is there a Log configuration or way to configure the API client
so that these messages from other IClient instances do not appear
in this client's log?

Quote:
Order ACCEPTED: #105177023 TAKE PROFIT BUY 0.002 mil. EUR/USD @ LIMIT 1.35434 IF ASK <= 1.35434 - Position #24920792
Position 24920792 TAKE PROFIT #105177023 price changed from 1.35434 USD to 1.35418 USD
Order ACCEPTED: #105177287 BUY 0.002 mil. EUR/USD @ MKT MAX SLIPPAGE 0.001 - Position #24920792


I notice that the Order Label field is not printed, and that would have helped me
to figure out the origin of the trading because my labels help to identify trading instances.

HyperScalper


 
 Post subject: Re: Order Messages from another Client process in account Post rating: 0   New post Posted: Wed 06 Nov, 2013, 16:33 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Obviously logs are not part of the API, if you want to retrieve more information about TP/SL change orders consider running a strategy which logs this information, i.e., logs labels and prices of messages with IMessage.getReason == IMessage.Reason.ORDER_CHANGED_SL or IMessage.Reason.ORDER_CHANGED_TP.


 
 Post subject: Re: Order Messages from another Client process in account Post rating: 0   New post Posted: Mon 11 Nov, 2013, 20:06 
User avatar

User rating: 98
Joined: Mon 23 Jul, 2012, 02:02
Posts: 656
Location: United States, Durham, NC
I guess I was not being clear in my question. Here I have a standalone API process
running on Linux. The standalone API client is running 6 concurrent Strategies.

In my Strategy code, I don't explicitly print this data to the console, but I get
a message in the console log duplicated for each running strategy, even though
none of those strategies was responsible for the price change.

This logging to the linux console appears to be done by default, and so
I'm wondering if there is a setting for the Logger which will suppress this information.

If I want to print this, then I'll do so in the Strategy code explicitly.

Hope that clarifies my issue.

Quote:
Position 25077639 STOP LOSS #105740836 price changed from 99.181 JPY to 99.2 JPY
Position 25077639 STOP LOSS #105740836 price changed from 99.181 JPY to 99.2 JPY
Position 25077639 STOP LOSS #105740836 price changed from 99.181 JPY to 99.2 JPY
Position 25077639 STOP LOSS #105740836 price changed from 99.181 JPY to 99.2 JPY
Position 25077639 STOP LOSS #105740836 price changed from 99.181 JPY to 99.2 JPY
Position 25077639 STOP LOSS #105740836 price changed from 99.181 JPY to 99.2 JPY


 
 Post subject: Re: Order Messages from another Client process in account Post rating: 0   New post Posted: Fri 15 Nov, 2013, 00:50 
User avatar

User rating: 98
Joined: Mon 23 Jul, 2012, 02:02
Posts: 656
Location: United States, Durham, NC
Here's what I get in my Linux console log and none of these was initiated
by my 6 concurrently running Strategies. I inserted the blank lines
so you can see the clear grouping.

I'm going to assume I can't suppress this, or can I ? via a logging properties
file or some other mechanism in my standalone API client?

HyperScalper

Quote:
Position 25178949 TAKE PROFIT #106253564 price changed from 134.77 JPY to 134.776 JPY
Position 25178949 TAKE PROFIT #106253564 price changed from 134.77 JPY to 134.776 JPY
Position 25178949 TAKE PROFIT #106253564 price changed from 134.77 JPY to 134.776 JPY
Position 25178949 TAKE PROFIT #106253564 price changed from 134.77 JPY to 134.776 JPY
Position 25178949 TAKE PROFIT #106253564 price changed from 134.77 JPY to 134.776 JPY
Position 25178949 TAKE PROFIT #106253564 price changed from 134.77 JPY to 134.776 JPY

Position 25178950 TAKE PROFIT #106253568 price changed from 134.763 JPY to 134.769 JPY
Position 25178950 TAKE PROFIT #106253568 price changed from 134.763 JPY to 134.769 JPY
Position 25178950 TAKE PROFIT #106253568 price changed from 134.763 JPY to 134.769 JPY
Position 25178950 TAKE PROFIT #106253568 price changed from 134.763 JPY to 134.769 JPY
Position 25178950 TAKE PROFIT #106253568 price changed from 134.763 JPY to 134.769 JPY
Position 25178950 TAKE PROFIT #106253568 price changed from 134.763 JPY to 134.769 JPY

Position 25178951 TAKE PROFIT #106253523 price changed from 134.779 JPY to 134.785 JPY
Position 25178951 TAKE PROFIT #106253523 price changed from 134.779 JPY to 134.785 JPY
Position 25178951 TAKE PROFIT #106253523 price changed from 134.779 JPY to 134.785 JPY
Position 25178951 TAKE PROFIT #106253523 price changed from 134.779 JPY to 134.785 JPY
Position 25178951 TAKE PROFIT #106253523 price changed from 134.779 JPY to 134.785 JPY
Position 25178951 TAKE PROFIT #106253523 price changed from 134.779 JPY to 134.785 JPY

Position 25178952 TAKE PROFIT #106253560 price changed from 134.776 JPY to 134.782 JPY
Position 25178952 TAKE PROFIT #106253560 price changed from 134.776 JPY to 134.782 JPY
Position 25178952 TAKE PROFIT #106253560 price changed from 134.776 JPY to 134.782 JPY
Position 25178952 TAKE PROFIT #106253560 price changed from 134.776 JPY to 134.782 JPY
Position 25178952 TAKE PROFIT #106253560 price changed from 134.776 JPY to 134.782 JPY
Position 25178952 TAKE PROFIT #106253560 price changed from 134.776 JPY to 134.782 JPY

Position 25178949 TAKE PROFIT #106253564 price changed from 134.776 JPY to 134.782 JPY
Position 25178949 TAKE PROFIT #106253564 price changed from 134.776 JPY to 134.782 JPY
Position 25178949 TAKE PROFIT #106253564 price changed from 134.776 JPY to 134.782 JPY
Position 25178949 TAKE PROFIT #106253564 price changed from 134.776 JPY to 134.782 JPY
Position 25178949 TAKE PROFIT #106253564 price changed from 134.776 JPY to 134.782 JPY
Position 25178949 TAKE PROFIT #106253564 price changed from 134.776 JPY to 134.782 JPY

Position 25178950 TAKE PROFIT #106253568 price changed from 134.769 JPY to 134.775 JPY
Position 25178950 TAKE PROFIT #106253568 price changed from 134.769 JPY to 134.775 JPY
Position 25178950 TAKE PROFIT #106253568 price changed from 134.769 JPY to 134.775 JPY
Position 25178950 TAKE PROFIT #106253568 price changed from 134.769 JPY to 134.775 JPY
Position 25178950 TAKE PROFIT #106253568 price changed from 134.769 JPY to 134.775 JPY
Position 25178950 TAKE PROFIT #106253568 price changed from 134.769 JPY to 134.775 JPY

Position 25178951 TAKE PROFIT #106253523 price changed from 134.785 JPY to 134.791 JPY
Position 25178951 TAKE PROFIT #106253523 price changed from 134.785 JPY to 134.791 JPY
Position 25178951 TAKE PROFIT #106253523 price changed from 134.785 JPY to 134.791 JPY
Position 25178951 TAKE PROFIT #106253523 price changed from 134.785 JPY to 134.791 JPY
Position 25178951 TAKE PROFIT #106253523 price changed from 134.785 JPY to 134.791 JPY
Position 25178951 TAKE PROFIT #106253523 price changed from 134.785 JPY to 134.791 JPY

Position 25178952 TAKE PROFIT #106253560 price changed from 134.782 JPY to 134.788 JPY
Position 25178952 TAKE PROFIT #106253560 price changed from 134.782 JPY to 134.788 JPY
Position 25178952 TAKE PROFIT #106253560 price changed from 134.782 JPY to 134.788 JPY
Position 25178952 TAKE PROFIT #106253560 price changed from 134.782 JPY to 134.788 JPY
Position 25178952 TAKE PROFIT #106253560 price changed from 134.782 JPY to 134.788 JPY
Position 25178952 TAKE PROFIT #106253560 price changed from 134.782 JPY to 134.788 JPY


 
 Post subject: Re: Order Messages from another Client process in account Post rating: 0   New post Posted: Fri 15 Nov, 2013, 08:21 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
The non-logger messages will get removed.


 
 Post subject: Re: Order Messages from another Client process in account Post rating: 0   New post Posted: Tue 26 Nov, 2013, 16:50 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
You can "shut down" those messages by passing a stub java.io.PrintStream to IClient.setOut and IClient.setErr, e.g.:
client.setOut(new PrintStream(new OutputStream(){public void write(int b) throws IOException {}}){});


 
 Post subject: Re: Order Messages from another Client process in account Post rating: 0   New post Posted: Tue 26 Nov, 2013, 21:17 
User avatar

User rating: 96
Joined: Mon 09 Sep, 2013, 07:09
Posts: 287
Location: Ukraine, SHostka
API Support wrote:
You can "shut down" those messages by passing a stub java.io.PrintStream to IClient.setOut and IClient.setErr, e.g.:
client.setOut(new PrintStream(new OutputStream(){public void write(int b) throws IOException {}}){});
Is there a way to do such a thing with a remote running strategy?


 
 Post subject: Re: Order Messages from another Client process in account Post rating: 0   New post Posted: Wed 27 Nov, 2013, 08:51 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
You can't control system logs on the remote server.


 

Jump to:  

cron
  © 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