Forum

Is possible to close a position with a limit order in HEDGING system?

Hi, I would like know if is possible to close a position (or invert it) with a limit order ( TRADE_ACTION_PENDING ) in HEDGING system? Even when I set the order.position to the position id (ticket) that I would like to close, I'm getting the error 10013 " invalid request ". Since this error is

How to show a datetime in Data Window for my custom indicator?

Is possible to show a value different from a double type in the Data Window? I would like to show a value of type datetime for my custom indicator

Compilation from command line not working

Hi, I'm trying to run the "metaeditor64.exe" from the command line, but it's not working. I'm follow this documentation page: https://www.metatrader5.com/en/metaeditor/help/development/compile I also tried to put the editor in global PATH on Windows10, for shrotcut, but there is no diference. I'm

TradeEventPositionOpened() is never executed.

You can reproduce by creating a simple EA (generate) from wizard and define that it will listen for trade events, setting the m_on_trade_process to true. In OnInit() function , after initialize the expert, place the follow line: ExtExpert.OnTradeProcess( true ); After, place a breakpoint in the

TradeEventPositionOpened() never executed!

Hi, I'm new in mql5 and I'm trying to following the docs to listen the position opened "event". The functions like TradeEventPositionOpened() and TradeEventPositionClosed() are never executed. But the functions like TradeEventOrderTriggered() and TradeEventPositionStopTake() are executed. For now