How to get the current order's TickSize,TickValue,LotSize

Created at 04 May 2020, 08:49
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
18

18561682791

Joined 03.05.2020

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!


cTrader Automate
@18561682791
Replies

PanagiotisCharalampous
04 May 2020, 11:09

Hi there,

You should just multiply the tick size by the position's volume

Symbol.TickSize * position.Volume

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

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 

Join us on Telegram

 

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