Replies

Renda
19 Jun 2017, 09:34

RE: RE:

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

 

 


@Renda

Renda
18 Jun 2017, 20:05

RE:

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

 

 


@Renda

Renda
18 Jun 2017, 02:13

RE:

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.

/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.


@Renda

Renda
16 Jun 2017, 10:45

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.


@Renda

Renda
08 Apr 2016, 16:50

RE:

Thanks, but what i need is when i have active limit order and i need to assign its price to my variable. I want to meassure distance from current price to a active limit order. I can do it for buy or sell order but not for a limit order, i did not found any help in any source code (indi/cbot)

 

Can anyone help please?

 

 

Spotware said:

Dear Trader,

There is a general formula to covert price difference to pips.  

pips = priceDif / Symbol.PipSize

 

 


@Renda