You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CalculateLotsForDeal() method calculates maximum lots for deal depends on current price and volume of instrument in one lot.
Formula: lots = maxCost // (currentPrice * volumeInLot), it means max count of lots, for which will be: cost = lots * currentPrice * volumeInLot <= maxCost.
If costOneLot = currentPrice * volumeInLot > maxCost, then returned lots = 1.
If an error occurred then returned lots = 0.
This method can be used when you need to calculate lots to open position.
The text was updated successfully, but these errors were encountered:
CalculateLotsForDeal()
method calculates maximum lots for deal depends on current price and volume of instrument in one lot.Formula:
lots = maxCost // (currentPrice * volumeInLot)
, it means max count of lots, for which will be:cost = lots * currentPrice * volumeInLot <= maxCost
.If
costOneLot = currentPrice * volumeInLot > maxCost
, then returnedlots = 1
.If an error occurred then returned
lots = 0
.This method can be used when you need to calculate lots to open position.
The text was updated successfully, but these errors were encountered: