因為不希望用set類指令
請問有哪個指令和 SetPercentTrailing(50*200,95) 類似的?
謝謝
只有自已寫作了!其實寫起來難度不高!
你可以嘗試寫作看看!有卡在那裡在po上來...
s大,可否明示一下
我這樣寫感覺就是怪怪滴~~
if entryprice-lowest(low,barssinceentry)<=50 then buytocover
next bar at open;
if entryprice-lowest(low,barssinceentry)<=150 then buytocover
if entryprice-lowest(low,barssinceentry)<=250 then buytocover
參考看看~
http://www.yctseng.net/2011/04/blog-post_07.html
謝謝阿政
可是無法編譯耶
多單的移動折返函數程式碼 LongTrailingStop(啟動門檻,折返程度):
Input:Gate(Numeric),TurnBack(Numeric);
Vars:TS(0),PP(0);
PP=MaxPositionProfit(0)/PointValue/abs(CurrentContracts)
TS=iff(TurnBack<=1,(1-TurnBack)*PP,PP-TurnBack)
LongTrailingStop=iff(MarketPosition>0 and PP>=Gate, EntryPrice(0)+TS, 0)
空單的移動折返函數程式碼 ShortTrailingStop(啟動門檻,折返程度):
ShortTrailingStop=iff(MarketPosition<0 and PP>=Gate, EntryPrice(0)-TS, 99999)