Dukascopy
 
 
Wiki JStore Search Login

remote mode, no message [ORDER_CLOSED_BY_SL]
 Post subject: remote mode, no message [ORDER_CLOSED_BY_SL] Post rating: 0   New post Posted: Mon 12 Aug, 2013, 13:19 
User avatar

User rating: 1
Joined: Thu 24 Nov, 2011, 09:09
Posts: 36
Location: FranceFrance
Dear support,

When a position is closed by a stop loss order, strategies get the message with the following parameteres:

Type: ORDER_CLOSE_OK, content: Order closed, reason: [ORDER_CLOSED_BY_SL]

This is ok in Historical tester and in real time local server mode. But this message is not received in the remode server mode.

Could you please fix this issue ?
Regards,
almc

PS: The snippet used is as follows:

public void onMessage(IMessage message) throws JFException {
console.getOut( ).println("msgType, msgContent, msgReason : "
+message.getType().toString()+", "+message.getContent()+", "+message.getReasons().toString());
}


 
 Post subject: Re: remote mode, no message [ORDER_CLOSED_BY_SL] Post rating: 0   New post Posted: Thu 22 Aug, 2013, 08:22 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Cannot reproduce on Demo.

This what we had for remotely launched strategy:

public void onMessage(IMessage message) throws JFException { console.getOut( ).println("msgType, msgContent, msgReason : " +message.getType().toString()+", "+message.getContent()+", "+message.getReasons().toString()); }
INFO 22.08.2013 07:09:34 msgType, msgContent, msgReason : ORDER_CLOSE_OK, null, [ORDER_CLOSED_BY_SL]
INFO 22.08.2013 07:09:34 msgType, msgContent, msgReason : NOTIFICATION, ORDER_FILLED-Order FILLED at 1.33276 USD (#211195187 STOP LOSS BUY 0.001 mil. EUR/USD @ MKT IF ASK => 1.33275 EXPIRES: GTC) - Position #54135513, []
INFO 22.08.2013 07:09:34 Order FILLED at 1.33276 USD (#211195187 STOP LOSS BUY 0.001 mil. EUR/USD @ MKT IF ASK => 1.33275 EXPIRES: GTC) - Position #54135513
INFO 22.08.2013 07:09:33 msgType, msgContent, msgReason : ORDER_CHANGED_OK, , [ORDER_CHANGED_SL]
INFO 22.08.2013 07:09:33 Position 54135513 STOP LOSS #211195187 price changed from 1.3329 USD to 1.33275 USD
INFO 22.08.2013 07:09:23 msgType, msgContent, msgReason : ORDER_CHANGED_OK, , [ORDER_CHANGED_SL]
INFO 22.08.2013 07:09:23 Position 54135513 STOP LOSS #211195187 price changed from 1.333 USD to 1.3329 USD
INFO 22.08.2013 07:08:58 msgType, msgContent, msgReason : ORDER_FILL_OK, , [ORDER_FULLY_FILLED]
INFO 22.08.2013 07:08:58 msgType, msgContent, msgReason : NOTIFICATION, ORDER_FILLED-Order FILLED at 1.33285 USD (#211195186 ENTRY SELL 0.001 mil. EUR/USD @ LIMIT 1.33285 IF BID => 1.33285) - Position #54135513, []
INFO 22.08.2013 07:08:58 Order FILLED at 1.33285 USD (#211195186 ENTRY SELL 0.001 mil. EUR/USD @ LIMIT 1.33285 IF BID => 1.33285) - Position #54135513
INFO 22.08.2013 07:08:42 msgType, msgContent, msgReason : ORDER_CHANGED_OK, , [ORDER_CHANGED_SL]
INFO 22.08.2013 07:08:42 Position 54135513 STOP LOSS #211195187 price changed from 1.33385 USD to 1.333 USD
INFO 22.08.2013 07:08:38 msgType, msgContent, msgReason : ORDER_SUBMIT_OK, , []
INFO 22.08.2013 07:08:38 Order ACCEPTED: #211195187 STOP LOSS BUY 0.001 mil. EUR/USD @ MKT IF ASK => 1.33385 - Position #54135513
INFO 22.08.2013 07:08:38 Order ACCEPTED: #211195186 ENTRY SELL 0.001 mil. EUR/USD @ LIMIT 1.33285 IF BID => 1.33285 - Position #54135513

To see remote strategy log, use JForex->Portfolio->Strategy Log.
On JForex, there will be no any messages in case if strategy launched remotely.


 

Jump to:  

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