| || |
Anytime I cancel an order, I get a order status 'S'. This is not documented at Index
public method IO2GOrderRow.getStatus
The state of the order. See possible values in details.
virtual const char * getStatus () = 0
Ok,reading Open Market and Close Market Orders,appears as Pending Cancelled (S)
One question more, There is any way to get the status of an order executed, cancelled, rejected while not connected?
Similar to ClosedTrades?
Example, I open an order and inet connection goes off, 2 hours later I reconnect and need update order status on database.
Please check the command Get Last Order Update
Originally Posted by Alessan
Thanks for response, I have another issue,
I read the post about create a limit/stop order on an existing trade, but every time i get the error:
Error on request: U100D3_QYTtK4y9mKpSYTSWiMPgQvnlhC7bOL085r7eItMqsSNSgc0DkWZAI3al6-5 - Desc=19915;DAS 19915: ZDas Exception
ORA-20179: Unable to find primary order for order 143505408
Then I make a simple test, on connect get open trades and call for this funcion for each:
the funcion called On Connect is:
void FXCM_O2G_Broker::SO(O2G2Ptr<IO2GTradeRow> trade)
IO2GRequestFactory *factory = m_Session->getRequestFactory();
if (factory == NULL)
IO2GValueMap *valueMap = factory->createValueMap();
if(trade->getBuySell() == 'S')
if(trade->getBuySell() == 'B')
IO2GRequest *request = factory->createOrderRequest(valueMap);
IO2GResponse* res = m_ResponseQueue.waitForResponse(request->getRequestID(), 10000);
I get same result ,error: ORA-20179: Unable to find primary order for order xxxxxxx
IO2GRequestFactory *requestFactory = m_Session->getRequestFactory();
IO2GRequest *request = requestFactory->createRefreshTableRequestByAccount(Trades, m_AccountID.c_str());
std::cout << "SyncTrades for account " << m_AccountID << std::endl;
IO2GResponse* response = m_ResponseQueue.waitForResponse(request->getRequestID(), 5000);
IO2GResponseReaderFactory *responseReaderFactory = m_Session->getResponseReaderFactory();
IO2GTradesTableResponseReader *responseReader = responseReaderFactory->createTradesTableReader(response);
std::cout << "trades table size: " << responseReader->size() << std::endl;
for (int i = 0; i < responseReader->size(); ++i)
IO2GTradeRow *tradeRow = responseReader->getRow(i);
SB_Trade trade = ToSBTrade(this->getName(), tradeRow);
std::cout << "FXCM_O2G_Broker::SyncTrades()" << e.what() << std::endl;
What is missing? May be my accout is FIFO?
(You can create either regular stop and limit orders (for non-FIFO accounts) or ELS (entry stop limit) orders for FIFO accounts)
Last edited by Alessan; 07-02-2012 at 07:27 PM.
It seem that you use FIFO account. It is not possible to add Stop/Limit (ELS) orders to existing positions on FIFO account. You can only attach Stop/Limit when creating a market order.
If you need to handle risk management for existing trades, you can use Net Stop/Limit orders.
Disclaimer: Trading foreign exchange on margin carries a high level of risk, and may not be suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to trade foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with foreign exchange trading, and seek advice from an independent financial advisor if you have any doubts. Any opinions, news, research, analyses, prices, or other information contained on this website is provided as general market commentary and does not constitute investment advice. Forex Capital Markets LLC. will not accept liability for any loss or damage, including without limitation to, any loss of profit, which may arise directly or indirectly from use of or reliance on such information.