Why does Take Profit doesn't work ???

 

Hello everybody,

I have set up a simple Buy Position with stop loss and take profit.  But, as you can see from the image, after a BUY position is Opened and target is reached,  it seems like the program doesn't recognize it and close the position after a very long time. 

I am losing my mind over this. Have you any idea why it behave like this? Thanks

myTrade.PositionOpen(_Symbol,ORDER_TYPE_BUY,1,SymbolInfoDouble(_Symbol,SYMBOL_ASK),stopLoss,takeProfit,"Buy Trade. Magic Number #"+(string) myTradingControlPanel.RequestMagic());
Files:
Cattura.PNG  22 kb
 

I doubt anybody can help with so little information. Can you post the log file ?

It's in the Strategy Tester right ?

Please post ALL relevant information to reproduce it.