In the ProBuilder language, PointSize refers to the size of a pip, which is a unit of measurement used in trading to express the change in value between two currencies. It is crucial for calculating price movements and determining trading strategies.
PointSize
floatingprofit = (((close-positionprice)*pointvalue)*countofposition)/pointsize //actual trade gains
This code calculates the floating profit of an open trading position. Here’s a breakdown of each component:
close: The current market price of the asset.positionprice: The price at which the position was opened.pointvalue: The monetary value of a single point or tick movement in the asset’s price.countofposition: The number of units (e.g., shares, contracts) in the position.pointsize: The size of a single point or tick in terms of the asset’s price.Price Difference: (close - positionprice) calculates the difference between the current price and the opening price of the position.
Point Value Adjustment: Multiplying the price difference by pointvalue converts this difference into a monetary value.
Position Size: Multiplying by countofposition scales this value to reflect the total size of the position.
Point Size Adjustment: Dividing by pointsize normalizes the profit calculation based on the definition of a point or tick in the asset’s pricing.
floatingprofit: Represents the unrealized profit or loss of the open position, reflecting how much the trader would gain or lose if the position were closed at the current market price.
Knowing the PointSize is essential for precise risk management and for implementing effective trading strategies in algorithmic trading.