distance from a limnit order
distance from a limnit order
13 Mar 2016, 12:21
Hi,
i am programming simple market analyzer. I need to measure the distance from active limit order to the current price. I need to know if the price is close to the limit order and will make the reaction without filling me. How can i please get the pip distance or the price of active limit orders?
Thank you
Replies
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
Spotware
18 Apr 2016, 17:28
Dear Trader,
When you create a limit order you have to specify a price. Why don't you assign the desired price to a variable and the use this variable to pass the price to the limit order and after use it for your calculations.
In addition, please have a look at the following code snippet:
PlaceLimitOrder(TradeType.Buy, Symbol, 10000, Symbol.Bid); PendingOrder order = LastResult.PendingOrder; Print("The pending order's target price is: {0}", order.TargetPrice);
We hope this helps you.
@Spotware
Spotware
24 Mar 2016, 16:35
Dear Trader,
There is a general formula to covert price difference to pips.
@Spotware