ModifyPendingOrder

Created at 19 Jun 2020, 09:00
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
thuyetdz's avatar

thuyetdz

Joined 18.06.2020

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);
                    }                                          
                }
            }


@thuyetdz
Replies

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

thuyetdz
20 Jun 2020, 09:07

Dear PanagiotisCharalampous

Thank you for your reply. I have done that with your help.


@thuyetdz