期貨日內交易系統
作者:開拓者 TB 來源:cxh99.com 發布時間:2014年06月05日
- 咨詢內容:
//1、最好使用在每日波動大于100點的品種上
//2、使用在一分鐘K線圖。
//3、做空:要求均線系統5、10同時在20下,20在30下,30在60下空頭排列,
// 期價反彈上5、10,但不能導致5、10線反彈上20線,其后又跌破5、10做空,
// 注意一定是收盤價先上5、10線,然后再下5、10線時做空。
//4、平倉:收盤價上MA5平倉或止損。
//5、買多相反
求編程
- TB技術人員:
params
numeric length1(5);
numeric length2(10);
numeric length3(20);
numeric length4(30);
numeric length4(60);
Numeric ExitOnCloseMins(14.55);
numeric lots(1);
vars
numeric ma1(5);
numeric ma2(10);
numeric ma3(20);
numeric ma4(30);
numeric ma4(60);
begin
ma1 = xaverage (close , length1);
ma2 = xaverage (close , length2);
ma3 = xaverage (close , length3);
ma4 = xaverage (close , length4);
If(Date<>Date[1] and Time<ExitOnCloseMins/100)
{
if( ma1[1]<ma3[1] and ma2[1] <ma3[1] and ma3[1] < ma4[1])
{
if ( ma1[1] < ma4[1] and ma2[1] <ma4[1])
{
if (close[1]>ma1[1] and close[1] > ma2[1] )
{
if ( low < ma1[1] and low <ma2[1] )
{
sellshort(lots ,open);
}
}
}
}
If(Time>=ExitOnCloseMins/100)
{
if (low <ma1[1] and low <ma2[1] )
{
buytocover(0.0);
}
}
end
以上代碼,我沒有測試,不過希望給一個提示。
- TB客服:
- 網友回復:
代碼里面有問題吧