Please help me New Order Single (MsgType(35)=D) Error

Created at 03 Jan 2017, 01:24
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
LO

love9712

Joined 11.12.2016

Please help me New Order Single (MsgType(35)=D) Error
03 Jan 2017, 01:24


New Order Single (MsgType(35)=D) is error

Is there anyone who can help me?

If you have successful example code and messages, it will be very helpful.

----------------------------------------------- Error Message ------------------------------------------------------

FIX.4.4:pepperstone.3178806->cServer------client onCreate Session-------FIX.4.4:pepperstone.3178806->cServer1
<event> Created session
<event> Connecting to 45.114.116.65 on port 5202
<event> Connection succeeded
<event> Session reset: ResetOnLogon
<event> Session reset: ResetSeqNumFlag
<outgoing> 8=FIX.4.49=12135=A34=149=pepperstone.317880652=20170102-23:16:25.99056=cServer57=Trade98=0108=3000141=Y553=ID554=Password10=225
<event> Initiated logon request
<incoming> 8=FIX.4.49=9835=A34=149=cServer50=Trade52=20170102-23:16:26.55056=pepperstone.317880698=0108=3000141=Y10=080
<event> Sequence numbers reset due to ResetSeqNumFlag=Y
FIX.4.4:pepperstone.3178806->cServer------client fromAdmin-------8=FIX.4.49=9835=A34=149=cServer50=Trade52=20170102-23:16:26.55056=pepperstone.317880698=0108=3000141=Y10=080
<event> Received logon
FIX.4.4:pepperstone.3178806->cServer------client toApp-------8=FIX.4.49=12735=D34=249=pepperstone.317880652=20170102-23:16:26.87856=cServer11=12338=4940=154=155=159=360=20170102-23:16:26.86510=215
<outgoing> 8=FIX.4.49=12735=D34=249=pepperstone.317880652=20170102-23:16:26.87856=cServer11=12338=4940=154=155=159=360=20170102-23:16:26.86510=215
<event> Session FIX.4.4:pepperstone.3178806->cServer disconnecting: System.Net.Sockets.SocketException (0x80004005): 현 재 연결은 원격 호스트에 의해 강제로 끊겼습니다
   위치: QuickFix.SocketInitiatorThread.ReadSome(Byte[] buffer, Int32 timeoutMilliseconds)
   위치: QuickFix.SocketInitiatorThread.Read()
FIX.4.4:pepperstone.3178806->cServer------client onLogout-------FIX.4.4:pepperstone.3178806->cServer
<event> Session reset: ResetOnDisconnect

----------------------------------------------- My Code ------------------------------------------------------

        public void OnLogon(SessionID sessionID)
        {
            Session session = Session.LookupSession(sessionID);
            QuickFix.FIX44.NewOrderSingle newOrderSingleRequest = new QuickFix.FIX44.NewOrderSingle();
            newOrderSingleRequest.Set(new ClOrdID("123"));
            newOrderSingleRequest.Set(new OrderQty('1'));
            newOrderSingleRequest.Set(new OrdType('1'));
            newOrderSingleRequest.Set(new Side('1'));
            newOrderSingleRequest.Set(new Symbol("1"));
            newOrderSingleRequest.Set(new TimeInForce('3'));
            newOrderSingleRequest.Set(new TransactTime(DateTime.Now));
        }

        public void ToAdmin(Message msg, SessionID sessionID)
        {
            msg.SetField(new StringField(57, "Trade"));
            msg.SetField(new StringField(553, "ID"));
            msg.SetField(new StringField(554, "Password"));
        }

----------------------------------------------- quickfix-client.cfg ------------------------------------------------------

[SESSION]
BeginString=FIX.4.4
SocketConnectPort=5202
FileStorePath=client
FileLogPath=clientlog
ConnectionType=initiator
SenderCompID=pepperstone.3178806
SocketConnectHost=45.114.116.65
TargetCompID=cServer
StartTime=00:00:00
EndTime=23:59:59
HeartBtInt=3000
ReconnectInterval=1
UseDataDictionary=Y 
DataDictionary=config/FIX44.xml
ResetOnLogon=Y
ResetOnLogout=Y
ResetOnDisconnect=Y
ResetOnError=Y
SSLEnable=N

 


@love9712
Replies

cyfer
03 Jan 2017, 04:05

"1" Is not a valid Qty for Currencies and you Selected EUR/USD in  newOrderSingleRequest.Set(new Symbol("1"));

newOrderSingleRequest.Set(new OrderQty('1'))

at least 1000 cause you determine the Qty in terms of Volume not Lots 

 

 

 

 


@cyfer

love9712
03 Jan 2017, 04:43

RE:

cyfer said:

"1" Is not a valid Qty for Currencies and you Selected EUR/USD in  newOrderSingleRequest.Set(new Symbol("1"));

newOrderSingleRequest.Set(new OrderQty('1'))

at least 1000 cause you determine the Qty in terms of Volume not Lots 

 

 

I changed the Netting account and the issue was resolved.
Is there a way to to use New Order Single Hedging account?

 

 


@love9712

love9712
03 Jan 2017, 04:48

RE:

cyfer said:

"1" Is not a valid Qty for Currencies and you Selected EUR/USD in  newOrderSingleRequest.Set(new Symbol("1"));

newOrderSingleRequest.Set(new OrderQty('1'))

at least 1000 cause you determine the Qty in terms of Volume not Lots 

 

I'm sorry Hedging Account also work

But how can close order in Hedging account?

 

 

 


@love9712

Spotware
03 Jan 2017, 09:34

Hello Love9712,

Currently it is not possible to close positions using Hedging account, therfore it is not recommended to use this account type and suggest only Netting. In the near future we will support the ability to close specific orders through FIX API. 

When this happens we will post in the forum. To be sure you find out about it we suggest subscribing to our mailing list - http://www.spotware.com/contact-us/subscribe-to-product-updates.

Many thanks,


@Spotware