請問在寫股期停損時,是否把當股票那樣用%寫就可以了?
我是這樣寫,但卻沒有自動停損出場。
如下
//個股報酬率_ plratio
variable:plratio(0);
if FilledAvgPrice <> 0 and condition_fitx = false
then
plratio = absValue( 100 * (Close - FilledAvgPrice) / FilledAvgPrice )//正負幾%
else
plratio = 0;
//--多單停損(股期)(%)
input:_stock_loss(1.5,"幾%停損(股期)");
if position > 0 and condition_fitx = false
and Close - FilledAvgPrice < 0
and plratio >= _stock_loss
then begin
SetPosition(0, market,label:="多單停損(股期)");
end;
4 評論