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

Issue

This Content is from Stack Overflow. Question asked by rerat

I wrote an EA in mql4. It places orders just fine using OrderSend(), but the trade, 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.


This Question was asked in StackOverflow by rerat and Answered by rerat It is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?