close

20161212 菁英班

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

●本日教學目標:1.布林通道  2.黃金交叉上就買進,死亡交叉下就賣出
3.iHigh : 黃金交叉時之H ; iLow : 死亡交叉時之L  4.修改成真的買賣指標
5.布林箱

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

**自己寫出勝率66%以上策略->>下周報告自己的策略

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

語法(指標) : **待修正

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

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

value1 = bollingerband(c,20,2);

plot1(value1,"BollingerUpperBand");

 

//下軌

value2 = bollingerband(c,20,-2);

plot2(value2,"BollingerDownperBand");

 

 

//進出場時機

variable:iHigh(0),iLow(0);

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

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

 

//看多進場:C穿越上軌(黃金交叉))

if c cross over value1 then

begin

        plot3(l*0.995,"看多進場");

        iHigh = h;

        //看多出場:OSC變負數(MACD翻綠)

        if oscValue < 0 then

        begin

                plot5(h*1.005,"看多出場");

        end;

end;

 

//看空進場:C穿越下軌(死亡交叉))

if c cross under value2 then

begin

        plot4(h*1.005,"看空進場");

        iLow = l;

        //看多出場:OSC變正數(MACD翻紅)

        if oscValue > 0 then

        begin

                plot6(l*0.995,"看空出場");

        end;

end;

 

plot7(iHigh,"");

plot8(iLow,"");

 

//自設條件:

//看多進場:通道變寬,上軌向上幅度>下軌向下幅度

//看空進場:通道變寬,上軌向上幅度<下軌向下幅度

 

 

arrow
arrow
    全站熱搜

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