Hello,
I'm trying to write orders to a txt file to execute trades on an other platform to.
For this, I need to print my "sending orders".
I tried this :
public void onMessage(IMessage message) throws JFException {
//
console.getOut().println("engine.getOrders() : "+engine.getOrders());
console.getOut().println("message.getOrder() : "+message.getOrder());
}
Here is what I get in the console for a pending order with Entry, SL and TP...
As you can see the output from onMessage comes out at last.
What I need is to catch the order at the first place (at "sending order").
I don't want to wait until the order has been "ACCEPTED" because of slippage.
Is there a listener that catches buy and sell actions before they are sent to the server ?
2010-09-09 15:05:17 message.getOrder() : [jf1ck3bm1]-OPENED / EUR/USD / 1.27415 / 0.05 / 0.05
2010-09-09 15:05:17 engine.getOrders() : [[jf1ck3bm1]-OPENED / EUR/USD / 1.27415 / 0.05 / 0.05]
2010-09-09 15:05:08 Order ACCEPTED: #49062186 TAKE PROFIT SELL 0.05 mil. EUR/USD @ LIMIT 1.27615 IF BID => 1.27615 - Position #10134455
2010-09-09 15:05:08 Order ACCEPTED: #49062185 STOP LOSS SELL 0.05 mil. EUR/USD @ MKT IF BID <= 1.27315 - Position #10134455
2010-09-09 15:05:08 Order ACCEPTED: #49062184 ENTRY BUY 0.05 mil. EUR/USD @ MKT IF ASK => 1.27415 - Position #10134455
2010-09-09 15:05:08 Order sent: TAKE PROFIT SELL 0.05 mil. EUR/USD @ LIMIT 1.27615 IF BID => 1.27615
2010-09-09 15:05:08 Order sent: STOP LOSS SELL 0.05 mil. EUR/USD @ MKT IF BID <= 1.27315
2010-09-09 15:05:08 Order sent: ENTRY BUY 0.05 mil. EUR/USD @ MKT IF ASK => 1.27415
2010-09-09 15:05:08 Sending order: TAKE PROFIT SELL 0.05 mil. EUR/USD @ LIMIT 1.27615 IF BID => 1.27615
2010-09-09 15:05:08 Sending order: STOP LOSS SELL 0.05 mil. EUR/USD @ MKT IF BID <= 1.27315
2010-09-09 15:05:08 Sending order: ENTRY BUY 0.05 mil. EUR/USD @ MKT IF ASK => 1.27415
Thanks