我用10分頻率交易 做多條件確立時 除了10分的布林通道需開口擴大外 30分的布林通道也要開口擴大
我的定義如下 這樣對嗎
input:length(22);
variable:up1(0),down1(0),mid1(0),bbandwidth1(0);
up1 = bollingerband(Close, Length, 2);
down1 = bollingerband(Close, Length, -2);
mid1 = (up1 + down1) / 2;
input:length2(66);
variable:up2(0),down2(0),mid2(0),bbandwidth2(0);
up2 = bollingerband(Close, Length, 2);
down2 = bollingerband(Close, Length, -2);
mid2 = (up2 + down2) / 2;
Condition1=up1[0]>up1[1] and up2[0]>up2[1] ;
Condition2=down1[0]<down1[1] and down2[0]<down2[1] ;
Condition3=mid1[0]>mid1[1] and mid2[0]>mid2[1] ;
結果不太對 不知錯在何處
4 評論