The question was whether this function can be used to modify the opening prices of pending orders, or if these orders have to be deleted and re-created at a new price every time. The answer is YES, of course you can change the opening price of a pending order using OrderModify().
Here is a quote from the MQL4 website:
bool OrderModify( int ticket, double price, double stoploss, double takeprofit, datetime expiration, color arrow_color=CLR_NONE)
Modification of characteristics for the previously opened position or pending orders. If the function succeeds, the returned value will be TRUE. If the function fails, the returned value will be FALSE. To get the detailed error information, call GetLastError() function.
Notes: Open price and expiration time can be changed only for pending orders.
If unchanged values are passed as the function parameters, the error 1 (ERR_NO_RESULT) will be generated.
Pending order expiration time can be disabled in some trade servers. In this case, when a non-zero value is specified in the expiration parameter, the error 147 (ERR_TRADE_EXPIRATION_DENIED) will be generated.
For successful forex trading it is very much important to make the profit consistently and reducing the loss as much as possible. Making profit is the main motto of every trader. As a trader, I am trading with Tpglobalfx. I choose them because they help me to do successful forex trading. By giving low spreads, high leverage, 24X5 customer support and easy trading methods, they help me to make profit consistently.
This content is blocked. Accept cookies within the '%CC%' category to view this content.