How to know the last modify price of a trade?

 

We know OrderOpenPrice() and OrderClosePrice() (which is Bid in case of Buy trade and Ask in case of Sell trade), but I can't find an option to know the last price when a trade was modified - let's call it OrderModifyPrice().

Well, MQL4 is pretty old now and it's possible that I'm missing something. I searched about this topic and I didn't found anything.

 
JDeel:

We know OrderOpenPrice() and OrderClosePrice() (which is Bid in case of Buy trade and Ask in case of Sell trade), but I can't find an option to know the last price when a trade was modified - let's call it OrderModifyPrice().

Well, MQL4 is pretty old now and it's possible that I'm missing something. I searched about this topic and I didn't found anything.

If you are talking about the Open price you must be talking about a Pending Order ? if you modify the open price the new price can be found using OrderOpenPrice() . . . I think.
 
JDeel: I can't find an option to know the last price when a trade was modified
Because there isn't one. Just remember the price
static double OrderModifyBid;
if( OrderModify(...) ) OrderModifyBid = Bid;
else Alert(...);
 
Right after the modification set the price value to a variable.
 
tonny:
Right after the modification set the price value to a variable.
After the modification the price is OrderOpenPrice()
 
The OP asked about the market price when the order was last modified. Not when the order opened. Not the last modified open price.
 
WHRoeder:
The OP asked about the market price when the order was last modified. Not when the order opened. Not the last modified open price.
The price when the order was modified is the modified price, the price prior to the modification is before the order was modified . . . "but I can't find an option to know the last price when a trade was modified" was modified is after the modification is complete . . . if the OP wanted the price prior to the modification then he/she should have written that.

You may well be correct in your assumption and the OP may actually want something other than what he/she asked for.
 

This raptor. Okay let say a trade opened a while ago then you want to modify maybe its stop loss. I believe you cant modify order open price of a market order everyone would be a billionare. So lets look at a sample code.

double LastModifyPrice;

int start()
{
 if(Something happens){
    OrderModify(....newsl...);     // Modify open trade
    LastModifyPrice=Bid;          // Price when the last modification was made
   }
}
 
tonny:

This raptor. Okay let say a trade opened a while ago then you want to modify maybe its stop loss. I believe you cant modify order open price of a market order everyone would be a billionare. So lets look at a sample code.

Thats another interpretation of what the OP wanted . . . we really need to hear from JDeel to find out what was actually wanted. I suspect it was the previous OrderOpenPrice(), the one before the OrderModify() . . . but that's just a guess.
 
RaptorUK:
Thats another interpretation of what the OP wanted . . . we really need to hear from JDeel to find out what was actually wanted. I suspect it was the previous OrderOpenPrice(), the one before the OrderModify() . . . but that's just a guess.

JDeel:

We know OrderOpenPrice() and OrderClosePrice() (which is Bid in case of Buy trade and Ask in case of Sell trade), but I can't find an option to know the last price when a trade was modified - let's call it OrderModifyPrice().

Well, MQL4 is pretty old now and it's possible that I'm missing something. I searched about this topic and I didn't found anything.


Chicken skin. But even if it were that way, he could still use the same method i posted to save it.
 
tonny:

Chicken skin. But even if it were that way, he could still use the same method i posted to save it.
Yes, he could.