ModifyPendingOrder
ModifyPendingOrder
19 Jun 2020, 09:00
Hello all,
Can someone help me retrieve the value of the previous price of the PendingOrder order.
I want to use it to compare with NewPrice, I have attached the code below.
I am trying to program this a long time, but it is not working good, sorry because my english is not good.
Thank you very much for any info.
foreach (var order in PendingOrders)
{
if (order.Label == "myLabel")
{
double newPrice = Symbol.Ask + 5 * Symbol.PipSize;
if(newPrice < Old installation price) // How to get the value of "Old installation price" ???
{
ModifyPendingOrder(order, newPrice, order.StopLossPips,order.TakeProfitPips, order.ExpirationTime);
}
}
}
PanagiotisCharalampous
19 Jun 2020, 09:41
Hi thuyetdz,
If you are looking for the current target price of the order, check PendingOrder.TargetPrice.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous