Sunday, 18 January 2015

Sử dụng Stochastics with Buy Sell (amibroker code)

amibroker code : Stochastics with Buy Sell trong phân tích kỹ thuật

Mô tả : Sử dụng chỉ báo với các tín hiệu mua bán được đánh dấu bằng mũi tên trên đó

-          Mua khi chỉ báo Stochastics (14,3,3) vượt từ dưới đường 20 lên trên

-          Bán  khi chỉ báo Stochastics (14,3,3)  từ  bên trên đường 80 xuống dưới

Hướng dẫn :

-          Coppy đoạn code bên dưới và dán vào fomula editor trong chương chình ambibroker đặt tên và lưu lại .

-          Vào custom kích đúp vào chỉ báo và xem kết quả 

code:---------------------------------------------------------------------------------------------------------------

//===========================================================================
Buy=Cross(StochD(14,3,3),20) ;
Sell =Cross(80,StochD(14,3,3));
shape = Buy * shapeUpArrow+ Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorGreen , colorRed )) ;
//AlertIf( Buy , "SOUND C:\\Windows\\Media\\Ding.wav", "Audio alert", 2 );

//===========================================================================

periods = Param( "Periods", 14, 1, 200, 1 );
Ksmooth = Param( "%K avg", 3, 1, 200, 1 );
Dsmooth = Param( "%D avg", 3, 1, 200, 1 );
Plot( StochD( periods , Ksmooth, DSmooth ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );

_SECTION_BEGIN("Stochastic %K");
periods = Param( "Periods", 14, 1, 200, 1 );
Ksmooth = Param( "%K avg", 3, 1, 200, 1 );
Plot( StochK( periods , Ksmooth), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();

periods = Param( "Periods", 14, 1, 200, 1 );
Ksmooth = Param( "%K avg", 3, 1, 200, 1 );
Dsmooth = Param( "%D avg", 3, 1, 200, 1 );
Plot( StochD( periods , Ksmooth, DSmooth ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );

_SECTION_BEGIN("Stochastic %K");
periods = Param( "Periods", 14, 1, 200, 1 );
Ksmooth = Param( "%K avg", 3, 1, 200, 1 );
Plot( StochK( periods , Ksmooth), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();

_SECTION_BEGIN("Stochastic %K1");
periods = Param( "Periods", 14, 1, 200, 1 );
Ksmooth = Param( "%K avg", 3, 1, 200, 1 );
Plot( StochK( periods , Ksmooth), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();


Plot(80,"", colorBlue, styleThick |styleNoLabel);
Plot(20,"", colorBlue, styleThick |styleNoLabel);

 Đây là hình ảnh chỉ báo :

http://www.v2htrader.com/2015/01/su-dung-stochastics-with-buy-sell.html
chỉ báo Stochastics

 


 

No comments: