how to get distance i pips price-limit order to Cbot pleease?

13 Jun 2017, 14:12how to get distance i pips price-limit order to Cbot pleease?#1
Rendaposts: 7since: 13 Mar 2016

Hello all,

can someone please help me how to get the distance from current price to limit order? position.Entryprice is i think for filled positions and somethink like order.Entryprice is possible?

 

I want to be alerted when price is near about 3pips from my limit order and already made a reaction for example 10 pips. It is simple to use build in alerts, but i want to be alerted only when price made a reaction without filling me, so i can remove the limit order and not to take second test of my level. I am trying to program this a long time, but it is not working good, i need to know the distance price---limit.order.

 

Thank you very much for any info.

 

Rene 

16 Jun 2017, 10:45#2
Rendaposts: 7since: 13 Mar 2016

Do not tell me that noone ever needed such a information in his Cbot. I just need to know how far from my limit orders is the price right now. Is there any way???? pleeese, right now i am trying to read entry prices of my limit orders from excel file and compre them with bid/ask price, but it is not what i need.

16 Jun 2017, 11:13#3
tmc.posts: 185since: 31 Aug 2015

Difference between current price and target price of pending order, divided by pip size gives you number of pips away from your order.

https://ctdn.com/api/reference/pendingorder/targetprice


Automated Trading Robots & Indicators developer | belochjiri@hotmail.com
18 Jun 2017, 02:13RE:#4
Rendaposts: 7since: 13 Mar 2016

tmc. said:

Difference between current price and target price of pending order, divided by pip size gives you number of pips away from your order.

https://ctdn.com/api/reference/pendingorder/targetprice

Thank you very much,

 

but can you tell me please how to read the "targetprice" when i have alredy some pending orders set. Maybe some example please.

18 Jun 2017, 11:34#5
tmc.posts: 185since: 31 Aug 2015
private void PrintDistanceForEachPendingOrder()
{
    var pendingOrders = PendingOrders;

    foreach (var pendingOrder in pendingOrders)
    {
        var distancePips = Math.Round(Math.Abs(pendingOrder.TargetPrice - (pendingOrder.TradeType == TradeType.Buy ? Symbol.Ask : Symbol.Bid)) / Symbol.PipSize, 1);
        Print(distancePips);
    }
}

 


Automated Trading Robots & Indicators developer | belochjiri@hotmail.com
18 Jun 2017, 20:05RE:#6
Rendaposts: 7since: 13 Mar 2016

tmc. said:

private void PrintDistanceForEachPendingOrder()
{
    var pendingOrders = PendingOrders;

    foreach (var pendingOrder in pendingOrders)
    {
        var distancePips = Math.Round(Math.Abs(pendingOrder.TargetPrice - (pendingOrder.TradeType == TradeType.Buy ? Symbol.Ask : Symbol.Bid)) / Symbol.PipSize, 1);
        Print(distancePips);
    }
}

You are the best!!!!

 

Thank you very much, i will try it as soon as the market is active. Again thanks a lot, you save me a bunch of time!

 

Rene

 

 

19 Jun 2017, 09:34RE: RE:#7
Rendaposts: 7since: 13 Mar 2016

Renda said:

tmc. said:

private void PrintDistanceForEachPendingOrder()
{
    var pendingOrders = PendingOrders;

    foreach (var pendingOrder in pendingOrders)
    {
        var distancePips = Math.Round(Math.Abs(pendingOrder.TargetPrice - (pendingOrder.TradeType == TradeType.Buy ? Symbol.Ask : Symbol.Bid)) / Symbol.PipSize, 1);
        Print(distancePips);
    }
}

You are the best!!!!

 

Thank you very much, i will try it as soon as the market is active. Again thanks a lot, you save me a bunch of time!

 

Rene

It is working, again thanks man! And thanks to this forum!

Rene

 

 

19 Jun 2017, 10:55#8
tmc.posts: 185since: 31 Aug 2015

You're welcome!


Automated Trading Robots & Indicators developer | belochjiri@hotmail.com