You need to enable JavaScript in order to visit our site!
 
Logo PTMC
NAVIGATION
CANCEL
 
or via PTMC account
Restore password
or via PTMC account
Logo PTMC
NAVIGATION
or via PTMC account
Restore password
or via PTMC account
or via PTMC account
Restore password
or via PTMC account

Position

class
The Position object holds data related to position.

Properties

Account Account Gives access to all information of the account that opened the position.
Amount double Value of the position in lots.
CloseOrderId string ID of closing order (if postion was closed).
ClosePrice double Closing position price (for closed positions).
CloseTime DateTime Time when position was closed (for closed positions).
Comment string Returns comment for the selected position.
CurrentPrice double The market price obtainable from your broker.
Exp1 double Returns amount of base instrument part on which your position is open. Fixing when position was open.
Exp1Close double Returns amount of base instrument part on which your position is open.
Exp2 double Returns amount of counter instrument part on which your position is open. Fixing when position was open. The Exposure calculated using the amount and cross price.
Exp2Close double Returns amount of counter instrument part on which your position is open. For open position recalculating occurs after every new quote. If position close - return exposition fixing when position was close. The Exposure calculated using the amount and cross price.
GroupId long The ID of the position group. This group created when position opened by the MAM account.
Id string A unique number that the trading system assigns to each position.
Instrument Instrument Represents the information of instrument for position.
IsGroupPart bool Return true when position was sent by MAM account.
MagicNumber int Returns a magic number of chosen position.
OpenOrderId string Order number that opened a position. Unique number that the trading system assigns to each order. If a position opens based on an order, the position's OpenOrderId property will return the same number.
OpenPrice double Price at which the position was opened.
OpenTime DateTime Date and time the position was opened.
Side Operation Operation with which the position was opened (BUY or SELL).
StopLossOrder Order Provide acess to Stop Loss order of the current position or null if it isn't exist.
TakeProfitOrder Order Provide acess to Take Profit order of the current order or null if it isn't exist.

Methods

Close () Return: bool Close position.
Close (double amount) Return: bool Close part of the position.
Close (double amount, double price, int marketRange) Return: bool Close position with price change control
CloseAsync (Action<bool> callback) Return: bool Close position asynchronously.
CloseAsync (double amount, Action<bool> callback) Return: bool Close part of the position asynchronously.
CloseAsync (double amount, double price, int marketRange, Action<bool> callback) Return: bool Close position with price change control asynchronously
GetCommission (Currency currency) Return: double Commission amount for the position.
GetExposition (Currency currency) Return: double Returns amount of counter instrument part on which your position is open. For open position recalculating occurs after every new quote. If position close - return exposition fixing when position was close. The Exposure calculated using the amount and cross price.
GetProfitExp2 () Return: double Profit/loss calculated based on the current broker's price in counter currency.
GetProfitGross (Currency currency) Return: double Profit/loss (without swaps or commissions) all calculated based on the current broker's price. For open position it shows the profit/loss you would make if you close the position at the current price. If position closed, this parameter show profit/loss what trader have after closing this position.
GetProfitNet (Currency currency) Return: double Profit/loss calculated based on the current broker's price. For open position it shows the profit/loss you would make if you close the position at the current price. If position closed, this parameter show profit/loss what trader have after closing this position.
GetSwaps (Currency currency) Return: double Amounts collected/paid out by your broker when a position is rolled over to a new value date.
GetUsedMargin (Currency currency) Return: double Initial margin for opened position.
RemoveStopLoss () Return: bool Removes current stop-loss order
RemoveStopLossAsync (Action<bool> callback) Return: bool Removes current stop-loss order asynchronously
RemoveTakeProfit () Return: bool Removes current take-profit order
RemoveTakeProfitAsync (Action<bool> callback) Return: bool Removes current take-profit order asynchronously
Rollback () Return: bool Rollback position. This operation is allowed only for accounts with MasterPosition function and
SetStopLoss (double slPrice) Return: bool Sets a new (modifies existed) stop-loss order
SetStopLossAsync (double slPrice, Action<bool> callback) Return: bool Sets a new (modifies existed) stop-loss order asynchronously
SetStopLossTrail (double slPrice) Return: bool Sets a new (modifies existed) stop-loss order with trailing
SetStopLossTrailAsync (double slPrice, Action<bool> callback) Return: bool Sets a new (modifies existed) stop-loss order with trailing asynchronously
SetTakeProfit (double tpPrice) Return: bool Sets a new (modifies existed) take-profit order
SetTakeProfitAsync (double tpPrice, Action<bool> callback) Return: bool Sets a new (modifies existed) take-profit order asynchronously
PTMC 是一個專業的交易平台,結合了強大的圖表和分析工具,並可在不同的金融市場進行交易。 它是由 PFSOFT UK LTD 開發的,該公司是全球銀行和經紀商交易技術提供商
© 2024. PTMC 為基於 Protrader 技術的專業交易平台
地址
臺北市大安區羅斯福路3段273號5樓
聯絡我們
電話: +886-2-2367-8583
E-mail: service@kcdatanet.com
社群
© 2024. PTMC 為基於 Protrader 技術的專業交易平台