And your answer :I have some other questions on the use of TC Bridge library (tc_bridge_utils.mqh)
- do the functions tc_ib_bid() and tc_ib_ask() use the true bid/ask value of a symbol from IB ? Can I use them to determine when to place order with this IB tick value ?
- When an order has been placed on IB, does the function PositionGetDouble(POSITION_PRICE_OPEN) return the true price of execution on IB ?
So, I use these functions to place orders.
- yes (weighted average open price).
But when I use the tc_ib_bid(_Symbol) or tc_ib_ask(_Symbol) functions to place orders :
Code: Select all
trade.Buy(Lots, _Symbol, tc_ib_ask(_Symbol), tc_ib_ask(_Symbol) - stopLoss, tc_ib_ask(_Symbol) + takeProfit);
2017.09.04 13:58:24.348 essaiStrategie (USDCHF,H1) CTrade::OrderSend: market buy 1.00 USDCHF sl: 17976931348623157081452742373170435679807056752584499659891747680315726078002853876058955863276687817154045895351438246423432132688946418276846754670353751698604991057655128207624549009038932894407586850845513
It's independent of the currency used.
What goes wrong with that ? Do you have any examples showing how to use these functions correctly ?
Furthermore, I have loaded the script tc_sc_bridge_events , and it shows very good price from IB in the chart.