How to get the current order's TickSize,TickValue,LotSize
How to get the current order's TickSize,TickValue,LotSize
04 May 2020, 08:49
Hi,
How to obtain the current positionr's TickSize,TickValue,LotSize
foreach (var position in Positions)
{
swap += position.Swap;
commission += position.Commissions;
if (position.TradeType == TradeType.Buy)
{
profit_tick = (double)position.StopLoss - position.EntryPrice;
}
else
{
profit_tick = position.EntryPrice - (double)position.StopLoss;
}
value_mul += profit_tick / Symbol.TickSize * position.Quantity* Symbol.TickValue * Symbol.LotSize;
}
just need positionr's TickSize ... Not Symblo
Thanks!
Replies
18561682791
04 May 2020, 13:02
RE:
PanagiotisCharalampous said:
Hi there,
You should just multiply the tick size by the position's volume
Symbol.TickSize * position.Volume
Best Regards,
Panagiotis
thanks a lot .
I think,I didn't make it clear
I want to calculate the exact balance:
Net profit on orders = ((double)position.StopLoss - position.EntryPrice)/ Symbol.TickSize*position.Quantity * Symbol.TickValue * Symbol.LotSize
// value of StopLoss - EntryPrice
if the cbot load on"Eurusd" and there is a "BTCusd" order. Symbol.tickvalue!=Position.tickvalue(Suppose,) . then calculated Net profit is wrong. So I
need Position.tickvalue Position.Tickvalue Position.lotsize. to calculate The order's not Symbol.Tickvalue
thanks
@18561682791
PanagiotisCharalampous
04 May 2020, 11:09
Hi there,
You should just multiply the tick size by the position's volume
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous