Topics
22 Jun 2020, 15:24
 879
 3
19 Jun 2020, 09:00
 997
 3
Replies

thuyetdz
22 Jun 2020, 15:39

RE:

PanagiotisCharalampous said:

Hi thuyetdz,

See below

        protected override void OnBar()
        {
            foreach (var order in PendingOrders)
            {
                order.Cancel();
            }
        }

Best Regards,

Panagiotis 

Join us on Telegram

 

Thank you so much for the quick reply.


@thuyetdz

thuyetdz
20 Jun 2020, 09:07

Dear PanagiotisCharalampous

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


@thuyetdz

thuyetdz
18 Jun 2020, 16:16 ( Updated at: 19 Jun 2020, 09:19 )

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