Replies

pavan.deshpande
06 Sep 2018, 09:16

RE:

pavan.deshpande said:

Hi,

I am facing problem closing a position partially. The process I am following for this is:

Open buy position quantity = 10000

Order request:

8=FIX.4.49=14135=D34=349=xxxxx52=20180905-13:01:51.98556=cServer57=TRADE11=1|0_MOR_3_11824640638=1000040=154=155=160=20180905-13:01:5110=188

Response:

8=FIX.4.49=21235=834=449=cServer50=TRADE52=20180905-13:01:51.23656=xxxxxxx6=1.1585211=1|0_MOR_3_11824640614=1000037=14256054238=1000039=240=154=155=159=360=20180905-13:01:52.289150=F151=0721=8773710810=172

After this the CTrader terminal shows the position with volume as 10000

To close this position I am placing sell order with same position Id but quantity as 5000.

Close Request:

8=FIX.4.49=15335=D34=849=xxxxxxx52=20180905-13:02:39.11856=cServer57=TRADE11=1|0_MOR_7_11829354638=500040=154=255=160=20180905-13:02:39721=8773710810=039

Close Response:

8=FIX.4.49=21135=834=1049=cServer50=TRADE52=20180905-13:02:38.38656=xxxxxx11=1|0_MOR_7_11829354614=500037=14256055338=500039=240=154=255=159=360=20180905-13:02:39.433150=F151=0721=8773710810=155

As it is visible from the message that, the close order is getting filled. But when I see in the CTrader terminal, I still see the volume as 10000 instead of expected 5000.

 

I am quite clueless currently as how to resolve this issue.

Can anybody help me in this?

Regards,

Pavan

 

The problem is resolved. It was my code that was causing the problem. I was sending another stop order just after closing the position but with wrong side.

So this thread should be considered as closed.

 

Regards,

Pavan

 


@pavan.deshpande

pavan.deshpande
18 Jul 2018, 16:32

RE:

Panagiotis Charalampous said:

Hi Pavan,

Did you check if you get subsequent messages with quotes for the rest of the symbols? You should be getting one message per quote.

Best Regards,

Panagiotis

Hi,

Thanks for looking into it. But I have figured it out. After some more digging into the forum. I sent seperate market data request for each symbol and I started getting response for each of the symbol. But I am not sure why it is implementd this way, when MarketDataRequest message supports repeating group where in you can specify group of sumbols for subscription.

Regards,

Pavan


@pavan.deshpande

pavan.deshpande
28 Aug 2017, 14:10

Hi,

I looked for how I can handle this at my end and I found the solution. In QuickFix I can specify the data disctionary for each session which dictates the tag related validations for each message. I made this tag not required in this dictionary. As a result I am getting all the order responses correctly now.

 

Thanks and regards,

Pavan

 


@pavan.deshpande

pavan.deshpande
28 Aug 2017, 12:52

RE:

Spotware said:

Dear pavan.deshpande,

Thanks for bringing this into our attention. Tag 6 is optional in our execution report. Our FIX API Rules of Engagement states that it is required but this is wrong and will be updated soon. Is there a way to stop your FIX engine from complaining when this tag is missing?

Best Regards,

cTrader Team

Hi,

Thanks for the quick response. Actually I am using QuickFix engine for handling my FIX protocol related operations, and it is based on the generic FIX specifications for every message.

The application I am testing is supposed to connect to many other FIX engines and hence I am not sure if I can make any customisations for this problem.

Will it be possible for you to fill this tag with some value which I can ignore in my code, so that the error is avoided?

Regards,

Pavan


@pavan.deshpande