A little help with Oanda interface pls

Discussion in 'Trading Software' started by booking, May 10, 2006.

  1. booking


    After back/forward testing my auto-system with my own dummy trade interface I'm now coding up the Oanda (C++) implementation. In order to maximise the 2 months testing period on fxgame I'm coding it up from the scant documentation they give away with the code examples.

    Anyway - I'm wondering how I can identify whether a market order has been closed due to a stop or limit order.

    The obvious way is to call Account::getTrades() and then search for my ticket number in the returned trades - if it's not there then it's not open any more - however this seems cumbersome at best.

    If I do this.....

    MarketOrder marketorder;

    if (account->getTradeWithId(marketorder,ticket_num))
    // test for market order open

    Are there any fields I can look at in the interface that will give me whether the trade is still open or not? Or am I taking the wrong approach here?