sunshine wrote:Could you please also provide:
1) The name of the server you use (you can see it on the Trading Station status bar if you log in with your account, something like U100D1 or MiniReal).
2) The account identifier
3) A code snippet how do you create an order for which you get such error message (Your order could not be executed(\)). That is, which values you set in valuemap, e.g. which order type etc., and how you send a request. This will greatly help to understand what is going wrong.
Hi sunshine,
here you go:
Message: 'Your order 85444919 cannot be executed(\)'
1. Minireal2
2. XXX
3.
/** Create Range order.*/
public string CreateRangeOrder(string sOfferID, string sAccountID,
int iAmount, double dRateMin, double dRateMax, string sBuySell,
double dPegStopOffset,
double dPegLimitOffset,
string ADescription)
{
O2GRequestFactory factory = mSession.getRequestFactory();
O2GValueMap valuemap = factory.createValueMap();
valuemap.setString(O2GRequestParamsEnum.Command, fxcore2.Constants.Commands.CreateOrder);
valuemap.setString(O2GRequestParamsEnum.OrderType, fxcore2.Constants.Order.MarketOpenRange);
valuemap.setString(O2GRequestParamsEnum.AccountID, sAccountID); // The identifier of the account the order should be placed for.
valuemap.setString(O2GRequestParamsEnum.OfferID, sOfferID); // The identifier of the instrument the order should be placed for.
valuemap.setString(O2GRequestParamsEnum.BuySell, sBuySell); // The order direction (Constants.Buy for buy, fxcore2.Constants.Sell for sell).
valuemap.setDouble(O2GRequestParamsEnum.RateMin, dRateMin); // The minimum dRate at which the order can be filled.
valuemap.setDouble(O2GRequestParamsEnum.RateMax, dRateMax); // The maximum dRate at which the order can be filled.
valuemap.setString(O2GRequestParamsEnum.CustomID, ADescription); // The custom identifier of the order.
valuemap.setInt(O2GRequestParamsEnum.Amount, iAmount);
//added to create stop/limit
valuemap.setString(O2GRequestParamsEnum.PegTypeStop, fxcore2.Constants.Peg.FromOpen);//FromClose); // The peg stop type
valuemap.setDouble(O2GRequestParamsEnum.PegOffsetStop, dPegStopOffset);
valuemap.setString(O2GRequestParamsEnum.PegTypeLimit, fxcore2.Constants.Peg.FromOpen); // The peg limit type
valuemap.setDouble(O2GRequestParamsEnum.PegOffsetLimit, dPegLimitOffset);
O2GRequest request = factory.createOrderRequest(valuemap);
mSession.sendRequest(request);
return request.RequestID;
}
Params:
sOfferID: 1;
sSAccountId: XXX;
iAmount: 1000;
dRateMin: 1.36612;
dRateMax: 1.36642;
sBuySell: S;
dPegStopOffset: 16;
dPegLimitOffset: -6;
ADescription: (xxxxxxxxxx)
hope this helps.
thanks,
Anton.
Added:
Based on my log it seems that only S orders are rejected by the server.
B orders execute just fine.
Last edited by Anonymous on Mon Sep 19, 2011 12:04 am, edited 1 time in total.
Reason: hidden private info