entryprice [MultiCharts MC]
- 咨詢內容:
講師 您好
我想請問關於entryprice的問題, 如果我的掛單都使用停止單, 那麼在跳空時會發生掛單價和實際成交價不同的情況, 因此
我想要在code里面去print我的實際成交價是多少, 因此我使用entryprice, 但是如果我有兩筆以上的未平倉, 我想要知道最近一次進場的進場價格
而不是第一筆進場的價格, 請問我該怎麼寫?
謝謝
- MC技術部:
僅能自行紀錄了!它的功能僅能抓到第一筆未平倉的值..
第2篇 - MC技術部:
MC7 的指令才能支援多次進場的取用,若你有使用MC7 ,HELP中有說明
PosTradeEntryPrice
Returns an absolute numerical value, indicating the execution price of trade entry order.
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).
This function can only be used in signals.
To retrieve the total number of trades in specified position use
PosTradeCount
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
) - MC客服:
MC7 的指令才能支援多次進場的取用,若你有使用MC7 ,HELP中有說明
PosTradeEntryPrice
Returns an absolute numerical value, indicating the execution price of trade entry order.
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).
This function can only be used in signals.
To retrieve the total number of trades in specified position use
PosTradeCount
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
)
- 上一篇:商品天數設定一個月或一年,但每次回測只…
- 下一篇:訊號執行有誤
相關文章
-
沒有相關內容