講師 您好
我想請問關於entryprice的問題, 如果我的掛單都使用停止單, 那麼在跳空時會發生掛單價和實際成交價不同的情況, 因此
我想要在code里面去print我的實際成交價是多少, 因此我使用entryprice, 但是如果我有兩筆以上的未平倉, 我想要知道最近一次進場的進場價格
而不是第一筆進場的價格, 請問我該怎麼寫?
謝謝
僅能自行紀錄了!它的功能僅能抓到第一筆未平倉的值..
MC7 的指令才能支援多次進場的取用,若你有使用MC7 ,HELP中有說明
Returns an absolute numerical value, indicating the execution price of trade entry order.
Usage
PosTradeEntryPrice
(PosAgo
,TradeNumber
)
Where: PosAgo
- a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
TradeNumber
- a numerical expression, specifying the number of trade (zero-based).
Notes
This function can only be used in signals.
To retrieve the total number of trades in specified position use PosTradeCount
Example
will return a value of 100.2 for the second trade of the open position, if this trade was opened by the order filled at 100.2.PosTradeEntryPrice
(0
,1
)
編輯文章 by 客服一號 2011-12-16 14:18:32
MC7 的指令才能支援多次進場的取用,若你有使用MC7 ,HELP中有說明
Returns an absolute numerical value, indicating the execution price of trade entry order.
Usage
PosTradeEntryPrice
(PosAgo
,TradeNumber
)
Where: PosAgo
- a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
TradeNumber
- a numerical expression, specifying the number of trade (zero-based).
Notes
This function can only be used in signals.
To retrieve the total number of trades in specified position use PosTradeCount
Example
will return a value of 100.2 for the second trade of the open position, if this trade was opened by the order filled at 100.2.PosTradeEntryPrice
(0
,1
)
編輯文章 by 客服一號 2011-12-16 14:18:32