Search code examples
mql4

When my EA written with mql4 places an order using OrderSend(), the order is placed, but does not show on the chart


I wrote an EA in mql4. It places orders just fine using OrderSend(), but the horizontal lines showing the open price, SL and TP do not show up on the chart like it does when I manually place a trade. Not sure what I need to do to make it show the trade on the chart.

Here is the code I used to place the order:

OrderNumber = OrderSend(order_symbol, order_type, lots, ask, 0, sl, tp, comment, magic_number, 0, clrBlue);

Solution

  • I tried loading me EA on another PC and the trade lines show up. So on the PC that this wasn't working I uninstalled MT4 and reinstalled, working now.