Source code
OrderCalcProfit: estimate a price move in account currency
A price movement is not yet a money result. The instrument contract, trade size, direction and account currency connect the two. This matters when comparing instruments or moving a strategy between accounts with different deposit currencies.
Use the platform estimate
OrderCalcProfit estimates a trading result for the supplied symbol, order direction, volume and opening and closing prices. Its output is in account currency under the current trading environment. Check its boolean return before using the output.
Keep the assumptions visible
An illustrative estimate can use a proposed entry and stop price to explain the price-loss component. Label the symbol, account currency and volume beside the result. Commission and future swap require their own treatment; do not present a price estimate as a complete all-in bill.
Check both directions
Try an upward and downward hypothetical exit for a buy, then repeat for a sell. Compare the signs and approximate amounts with the terminal calculation. This simple exercise can expose a direction mix-up or a hard-coded currency conversion.
Create a readable preview
Ask AI to add a non-trading calculation panel before changing order sizing. It can display the chosen prices, quantity and estimated result without sending an order. Once the explanation is correct, you have a clearer foundation for reviewing a position-sizing rule.
Back to top










