Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Exploration Cloud Ichimoku for Amibroker (AFL)

Rating:
3 / 5 (Votes 3)
Tags:
amibroker, ichimoku

Lọc giá vượt mây ichimoku
Exploration buy and sell cloud Ichimoku

Indicator / Formula

Copy & Paste Friendly
Plot( C, "Close", IIf(C>Ref(C,-1),colorCustom9,colorRed),  ParamStyle("Style") | GetPriceStyle() ); 

_SECTION_BEGIN("Bollinger Bands");
Plot(MA( C, 20 ),"MA20",colorYellow,styleLine|styleThick);
P = ParamField("Price field",-1);
Periods = Param("Periods", 20, 2, 100, 1 );
Width = Param("Width", 2, 0, 10, 0.05 );
Color = ParamColor("Color", colorDarkGrey );
Style = ParamStyle("Style", styleLine | styleNoLabel ) | styleNoLabel;
Plot( bbt = BBandTop( P, Periods, Width ), "BBTop" + _PARAM_VALUES(), colorCustom1, Style ); 
Plot( bbb = BBandBot( P, Periods, Width ), "BBBot" + _PARAM_VALUES(), colorCustom1, Style ); 
PlotOHLC( bbt, bbt, bbb, bbb, "", ColorBlend( Color, GetChartBkColor(), 0.1 ), styleThick | styleCloud | styleNoRescale, Null, Null, Null, -1 );
_SECTION_END();

_SECTION_BEGIN("i");
/* ICHIMOKU CHART */
n1 = Param("Èøè?îêó: ïå?èîä 1",9,1,200,1); 
n2 = Param("Èøè?îêó: ïå?èîä 2",26,1,400,1); 
n3 = Param("Èøè?îêó: ïå?èîä 3",52,1,600,1); 
 
TenkanSen   =(HHV(H,n1)+LLV(L,n1))/2;            // Tenkan-sen (?åíêàí-ñåí) – ??î ñ?åäíåå çíà÷åíèå öåíû çà ïå?âûé ï?î?åæó?îê â?å?åíè (?àâíà (high+low)/2, ?äå high è low – ?àêñè?ó? è ?èíè?ó? çà ïå?èîä). 
KijunSen    =(HHV(H,n2)+LLV(L,n2))/2;            // Kijun-sen (Êèäæóí-ñåí) – ??î ñ?åäíåå çíà÷åíèå öåíû çà â?î?îé ï?î?åæó?îê. 
ChinkouSpan =Ref(C,-n2);                          // Chinkou Span (×èêîó ñïåí) - öåíà çàê?û?èÿ ?åêóùå?î áà?à, ñäâèíó?àÿ íàçàä íà âåëè÷èíó â?î?î?î â?å?åííî?î èí?å?âàëà. 
Cks         = Close;                             // ??àôè÷åñêèé Chinkou Span, ñäâè? íàçàä çàñ÷å? î??èñîâêè. 
SenkouSpanA =Ref((KijunSen+TenkanSen)/2,-n2);    // Senkou Span A (Ñåíêîó ñïåí À) / Up Kumo - ñå?åäèíà ?àññ?îÿíèÿ ?åæäó Tenkan-sen è Kijun-sen, ñäâèíó?îå âïå?åä íà âåëè÷èíó â?î?î?î â?å?åííî?î èí?å?âàëà. 
SpA         =(KijunSen+TenkanSen)/2;             // ??àôè÷åñêèé Senkou Span A , ñäâè? âïå?åä çàñ÷å? î??èñîâêè. 
SenkouSpanB =Ref((HHV(H,n3)+LLV(L,n3))/2,-n2);   // Senkou Span B (Ñåíêîó ñïåí Â) / Down Kumo - ñ?åäíåå çíà÷åíèå öåíû çà ??å?èé â?å?åííîé èí?å?âàë, ñäâèíó?îå âïå?åä íà âåëè÷èíó â?î?î?î â?å?åííî?î èí?å?âàëà. 
SpB         =(HHV(H,n3)+LLV(L,n3))/2;            // ??àôè÷åñêèé Senkou Span B, ñäâè? âïå?åä çàñ÷å? î??èñîâêè. 
DL = Ref( C, 25 );
 
 
Cond1 =  Ref(Close > Max(SenkouSpanA,SenkouSpanB),-1);  //öåíà âûøå îáëàêà  -- áû÷üå íàñ??îåíèå 
Cond2 =  Ref(Close < Min(SenkouSpanA,SenkouSpanB),-1);  //öåíà íèæå îáëàêà  -- ?åäâåæüå íàñ??îåíèå 
Cond3 =  Ref(Cross(TenkanSen,KijunSen),-1);  //ïå?åñå÷åíèå ?åíêàí è Êèäæóí -- ñè?íàë íà ïîêóïêó 
Cond4 =  Ref(Cross(KijunSen,TenkanSen),-1);  //ïå?åñå÷åíèå ?åíêàí è Êèäæóí -- ñè?íàë íà ï?îäàæó 
Cond5 =  Ref(Cross(Close,ChinkouSpan ),-1);  //ïå?åñå÷åíèå ×èêîó è öåíû 
Cond6 =  Ref(Cross(ChinkouSpan ,Close),-1);  //ïå?åñå÷åíèå ×èêîó è öåíû 
Cond7 =  Ref(Cross (Close , Max(SenkouSpanA,SenkouSpanB)),-1);  //öåíà âû?îäè? ââå?? èç îáëàêà  -- ñè?íàë íà ïîêóïêó 
Cond8 =  Ref(Cross ( Min(SenkouSpanA,SenkouSpanB), Close),-1);  //öåíà âû?îäè? âíèç  èç îáëàêà  -- ñè?íàë íà ï?îäàæó 
Cond9 = Close > TenkanSen AND TenkanSen > KijunSen AND KijunSen > Max(SenkouSpanA,SenkouSpanB); // ñè?íàë ??å? ëèíèé ââå?? 
Cond10= Close < TenkanSen AND TenkanSen < KijunSen AND KijunSen < Min(SenkouSpanA,SenkouSpanB); // ñè?íàë ??å? ëèíèé âíèç 
RemCond9=ExRem(Cond9,NOT Cond9);                  
RemCond10=ExRem(Cond10,NOT Cond10); 
 
ColSenk =IIf (Cond1,colorGreen, IIf(Cond2,colorRed,colorLightGrey)); // çàäàå? öâå?, åñëè öåíà âûøå/íèæå/âíó??è îáëàêà. 
Flat  =  TenkanSen == Ref(TenkanSen,-1) OR (NOT(Cond1) AND NOT(Cond2)) ; 
 
for( i = 0; i < BarCount; i++ ) //?àñê?àøèâàå? ñ?åäí?? ëèíè? èíäèêà?î?à ïî âçàè?î?àñïîëîæåíè? è íàï?àâëåíèÿ äâèæåíèÿ TenkanSen, öåíû è îáëàêà. 
{ 
   if (Flat[i]) 
      ColTenk[i] = colorLightGrey; 
   else
   { 
if (Cond1[i] AND TenkanSen[i] > TenkanSen[i-1]) 
     ColTenk[i] = colorGreen; 
if (Cond1[i] AND TenkanSen[i] < TenkanSen[i-1]) 
     ColTenk[i] = colorRed; 
if (Cond2[i] AND TenkanSen[i] < TenkanSen[i-1]) 
     ColTenk[i] = colorRed; 
if (Cond2[i] AND TenkanSen[i] > TenkanSen[i-1]) 
     ColTenk[i] = colorGreen; 
   } 
} 
 
//PlotShapes(IIf(Cond7, shapeSmallUpTriangle ,shapeNone),colorGreen,0,H,10);              
//PlotShapes(IIf(Cond8, shapeSmallDownTriangle ,shapeNone),colorRed,0,L,10); 
//PlotShapes(IIf(Cond3, shapeHollowSmallUpTriangle,shapeNone),colorGreen,0,H,12);              
//PlotShapes(IIf(Cond4, shapeHollowSmallDownTriangle ,shapeNone),colorRed,0,L,12); 
//PlotShapes(IIf(Cond5, shapeSmallCircle ,shapeNone),colorGreen,0,H,4);              
//PlotShapes(IIf(Cond6, shapeSmallCircle + shapePositionAbove ,shapeNone),colorRed,0,L,4); 
//PlotShapes(IIf(RemCond9 , shapeHollowSquare ,shapeNone),colorGreen,0,H,18);              
//PlotShapes(IIf(RemCond10, shapeHollowSquare + shapePositionAbove ,shapeNone),colorRed,0,L,18); 
 
//Plot (C,"Close",colorBlack,styleThick); 
Plot (C,"Bars",colorBlack,styleCandle); 
Plot (TenkanSen,"Tenkan-sen",colorRed); 
Plot (KijunSen, "Kijun-sen", colorBlue); 
Plot (Cks,"Chinkou Span",colorLime, style = styleLine,0,0,-n2); 
Plot (SpA,"SenkouSpanA",colorOrange,styleDashed,0,0,n2); 
Plot (SpB,"SenkouSpanB",colorViolet,styleDashed + styleThick,0,0,n2); 
PlotOHLC (SpA,SpA,SpB,SpB,"Cloud",IIf (SpA > SpB,ColorRGB( 64, 128, 128 ),ColorRGB( 128, 128, 128 )),styleCloud, 10, 10, n2 ); 
above = IIf(KijunSen>SenkouSpanA AND TenkanSen>SenkouSpanB,1,0);
within = IIf(KijunSen>SenkouSpanA AND TenkanSen<SenkouSpanB,1,0);
below = IIf(TenkanSen<SenkouSpanA AND TenkanSen<SenkouSpanB,1,0);
DK1 = C> SenkouSpanB;
DK2 = (SpB > SpA);
DK3 = (SenkouSpanB > SenkouSpanA);
DK4 = Cross(C, SenkouSpanB) or Cross(C, SenkouSpanA);
Buy = DK1  AND DK3 AND DK4;
PlotShapes( shapeUpArrow * Buy ,6,0,L,Offset=-15);
DK5 = MA(V, 20) > 100000;
Cover = Buy AND DK5;
Filter = Cover OR buy;
AddColumn(V,"Khoi Luong",1.0);
AddColumn(Cover,"Break Out Vuot May",True,colorcustom2,colorCustom6);
//Buy = Cross(TenkanSen,KijunSen) AND (DL>Close);
//Sell = Cross(KijunSen,TenkanSen) AND (DL<KijunSen);
//StrongBuy = Buy AND above;
//MediumBuy = Buy AND within;
//WeakBuy = Buy AND below;
//StrongSell = Sell AND below;
//MediumSell = Sell AND within;
//WeakSell = Sell AND above;

 
//IIf( (StrongBuy),PlotShapes(shapeUpTriangle*StrongBuy,colorGreen),0);
//IIf( (MediumBuy),PlotShapes(shapeUpArrow*MediumBuy,colorGreen),0);
//IIf( (WeakBuy),PlotShapes(shapeHollowUpArrow*WeakBuy,colorIndigo),0);
//IIf( (StrongSell),PlotShapes(shapeDownTriangle*StrongSell,colorRed),0);
//IIf( (MediumSell),PlotShapes(shapeDownArrow*MediumSell,colorRed),0);
//IIf( (WeakSell),PlotShapes(shapeHollowDownArrow*WeakSell,colorBrown),0);
 
 
// ?î?èçîí?àëüíàÿ öâå?íàÿ èíäèêà?î?íàÿ ïîëîñà (ï?è?å?). 
 
 
Plot( 1, "Ribbon", ColTenk, styleOwnScale|styleArea|styleNoLabel, -2, 200 );   // èíäèöè?óå? ôë?? íà TenkanSen. 
Plot( 4, "Ribbon", ColSenk, styleOwnScale|styleArea|styleNoLabel, -1, 200 );   // èíäèöè?óå? ïîëîæåíèå öåíû î?íîñè?åëüíî îáëàêà
_SECTION_END();
_SECTION_BEGIN("Price");
_SECTION_BEGIN("Magnified Market Price");
FS=Param("Font Size",35,11,100,1);
GfxSelectFont("Times New Roman", 28, 700, italic = True, underline = False, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor( ParamColor("Color",colorCustom9) );
Hor=Param("Horizontal Position",220,1,1200,1);
Ver=Param("Vertical Position",1,1,1,1);
GfxTextOut(""+C,Hor-150 , Ver+25 );
GfxTextOut( Name(), Hor,Ver-50 );
YC=TimeFrameGetPrice("C",inDaily,-1);
DD=Prec(C-YC,2);
xx=Prec((DD/YC)*100,2);
GfxSelectFont("Times New Roman", 10, 700, italic =True, underline = False, True );
GfxSetBkMode( colorWhite );
GfxSetTextColor(ParamColor("Color",colorCustom9) );
GfxTextOut(""+DD+" ("+xx+"%)", Hor-150, Ver+65 );
GfxSelectFont("arial", 18 );
GfxSetTextColor(ParamColor("dong",colorCustom8) );
GfxSetTextAlign( 6 );// center alignment
GfxSetTextColor( ColorRGB( 255, 255, 0 ) );
GfxSetBkMode(0); // transparent
GfxSelectFont("UVN But Long 1", Status("pxheight")/45 );
GfxTextOut( "CODE ICHIMOKU VUOT MAY KUMO", Status("pxwidth")/2, Status("pxheight")/10.5 );
GfxSelectFont("UVN But Long 1", Status("pxheight")/45 );
GfxSetTextColor( colorLightGrey );
GfxSelectFont("UVN But Long 1", Status("pxheight")/50 );
GfxTextOut( FullName() , Status("pxwidth")/1.2, Status("pxheight")/11 );
GfxTextOut( "("+Name()+") " , Status("pxwidth")/1.2, Status("pxheight")/8 );
_SECTION_END();

3 comments

1. arpitjpatel

hi, why dont u translate this in english and re-publish?

2. nguyen333

You are not author of this code.

3. duyqpc

it’s not working, can someone help me?

Leave Comment

Please login here to leave a comment.

Back