|

樓主 |
發表於 18-5-20 19:51
|
顯示全部樓層
本帖最後由 BeLikeCheetah 於 18-5-20 19:52 編輯
經過研究您的程式邏輯,想請問是否可以簡化成以下? 有沒有什麼疏漏的地方?
input: TrgP1( 10000 ), TrgP2( 20000 ), DDR1( 50 ), DDR2( 20 );
if MarketPosition <> 0 then begin
if MaxPositionProfit > TrgP1 then setpercenttrailing(TrgP1, DDR1) ; //第一階段停利
if MaxPositionProfit > TrgP2 then setpercenttrailing(TrgP2, DDR2) ; //第二階段停利
end ;
|
|