close

大盤已過高準備向下的now-->選出弱勢短空股

XS腳本程式碼 : 

// - - - -【 大盤頂點短空 】- - - - // 2016.11.04 改

// - - - - 布林通道 - - - - //

//{條件}:布林通道超賣

value1 = bollingerband(c,20,2);

condition1 = c < value1;

 

// - - - - 外資 - - - - //

//{條件}:外資連賣3日以上

input:days(3,"外資連賣N日");

value2 = GetField("外資買賣超","D");

condition2 = trueall(value2 < 0,days);

 

// - - - - MACD - - - - //

//{條件}:MACD續弱(OSC下降)

variable:difValue(0), macdValue(0), oscValue(0);

macd(weightedclose,12,26,9,difvalue,macdValue,oscValue);

condition3 = oscValue < oscValue[1];

 

// - - - - SAR - - - - //

//{條件}:低於SAR

value3 = SAR(0.02, 0.02, 0.2);

condition4 = c < value3;

 

// - - - - K棒 - - - - //

//{條件}:連兩天黑K

condition5 = c<o and c[1]<o[1];

 

// - - - - 量 - - - - //

//{條件}:60日均量>300,10日均量>500

input:xVOL(300,"60日均量大於");

input:yVOL(500,"10日均量大於");

value4 = average(v,60);

value5 = average(v,10);

condition6 = value4 > xVOL and value5 > yVOL;

 

// - - - - 震幅 - - - - //

//{條件}:10日內漲幅最高不得>5%

input:HShock(0.05,"10日內漲幅最高<");

value6 = highest((c-o)/o,10);

condition7 = value6 < HShock;

 

// - - - - - - - - - - - - - - - - - - - - - //

ret=condition1 and condition2

and condition3 and condition4

and condition5 and condition6

and condition7;

 

arrow
arrow
    全站熱搜

    Birdy.Huang 發表在 痞客邦 留言(0) 人氣()