交易系統(tǒng)范例,請大家點評,找出其中的錯誤或不妥: [金字塔]
- 咨詢內(nèi)容:
Input:N1(6),N2(12);
LC := REF(CLOSE,1);
RSI_6:SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100;
RSI_12:SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*100;ConBuy:=(Rsi_6 > Rsi_12) And Ref(Rsi_6,1)<=Ref(Rsi_12,1);
ConSell:=(Rsi_6 <= Rsi_12) And Ref(Rsi_6,1)>Ref(Rsi_12,1);
ConBuyShort:=(Rsi_6 <= Rsi_12) And Ref(Rsi_6,1)>Ref(Rsi_12,1);
ConSellShort:=(Rsi_6 > Rsi_12) And Ref(Rsi_6,1)<=Ref(Rsi_12,1);//做多、平空
If (ConBuy Or ConSellShort) And TisRemainEx(1,'888888','Ta01')=0 Then Begin
TSellShort(TSellHoldingEx('888888','Ta01',1)>0,0,LMT,DYNAINFO(28),0,'888888','Ta01');
Tbuy(TbuyHoldingEx('888888','Ta01',1)=0,1,LMT,DYNAINFO(34),0,'888888','Ta01');
DebugFile('F:\DebugFile.txt','當(dāng)前系統(tǒng)發(fā)出的信號是:做多 %.2f',CurrentTime);
End//做空、平多
[此貼子已經(jīng)被作者于2010-9-7 10:27:45編輯過]
If (ConSell Or ConBuyShort) And TisRemainEx(1,'888888','Ta01')=0 Then Begin
TSell(TbuyHoldingEx('888888','Ta01',1)>0,1,LMT,DYNAINFO(28),0,'888888','Ta01');
TBuyShort(TSellHoldingEx('888888','Ta01',1)=0,1,LMT,DYNAINFO(28),0,'888888','Ta01');
DebugFile('F:\DebugFile.txt','當(dāng)前系統(tǒng)發(fā)出的信號是:做空 %.2f',CurrentTime);
End - 金字塔客服:
不做交易,只能檢測了代碼語法沒啥錯誤,至于算法好壞,還請實盤高人指點
- 用戶回復(fù):
做一下歷史回測,看看表現(xiàn)如何。
- 網(wǎng)友回復(fù):
無法使用
- 網(wǎng)友回復(fù):
用是,肯定能用的,只是,其中有幾處錯誤,希望大家能開動腦筋、找出來。。。。
相關(guān)文章
-
沒有相關(guān)內(nèi)容