Tuesday, 3 March 2015

Sun & Cloud_i for Amibroker Afl

 Sun & Cloud_i  for Amibroker Afl
 
 
 
 
 
_SECTION_BEGIN("Sun & Cloud_i");
// by boufalo 13-1-2011
// Sun & Cloud System based on idea of ICHIMOKU CHART
/*
Reading of the chart, 
1.for long term investors, 
a.Bullish when you see the sun(Yellow zone) 
b.Bearish when you see the dark cloud(Black 
zone) 
c.Turning point from bullish to bearish:When 
red line break into the yellow zone. 
d.Turning point from bearish to bullish: When 
red line break through the dark cloud. 
2.for short term trading, 
reading the changes between the white line and 
the red line 
*/ 

Long2 =EMA( ( HHV( H, 20 ) + LLV( L, 20) )/2,20);
Long1 =EMA( ( HHV( H, 5 ) + LLV( L, 5) )/2,10);
K=(H+2*C+L)/4;
Z=  ( HHV( H, 3 ) + LLV( L, 3) )/2 ;
SP=IIf(K>=Z*1.05,1.10*Z,IIf(K<Z*1.05 AND K>=Z,1.0*Z,IIf(K<Z,0.9*Z,0.9*Z)));
M=IIf(Long1>long2,Long2,Long1);

Plot(C,"Close",colorBlack,styleLine);

SetChartBkGradientFill( ParamColor("Sky",ColorRGB( 128, 128, 255 )),ParamColor("Sky lower", colorGrey40),ParamColor("Text", colorLightGrey));
PlotOHLC( Long1 ,  Long1 ,  m, Long1 ," ", ParamColor("Left Side",ColorRGB( 213, 213, 0 )),styleCloud ); 
PlotOHLC( Long2 ,  Long2 ,  m, Long2 ," ", colorGrey40,styleCloud ); 
PlotOHLC( Long1 ,  Long1 ,  m, Long1 ," ", ParamColor("Land",ColorRGB( 115, 61, 54 )),styleArea );

Title=Name() + " { Sun & Cloud } : \n"+WriteIf(Long1>long2,"Rising Sun","Dark Cloud Cover");

GfxSelectSolidBrush(colorOrange);
GfxCircle( 100, 85 , 28 );
GfxSelectSolidBrush(colorYellow);
GfxSelectPen( colorRed ); 
GfxCircle( 100, 85 , 20 );
_SECTION_END();

No comments:

Post a Comment

Thanks