_SECTION_BEGIN("Price Chart");
bgTop = ParamColor("BgTop", colorBlack);
bgBot = ParamColor("BgBottom", colorBlack);
SetChartBkGradientFill( bgTop ,bgBot);
pStyle = ParamList("Price Style", "Candle|Solid Candle|Bar|Line|Heikin-Ashi");
cBull = ParamColor("Price Bull", colorLime);
CBear = ParamColor("Price Bear", colorRed);
cLine = ParamColor("Price Line", colorWhite);
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}}- {{INTERVAL}} {{DATE}} O= %g, H= %g, L= %g, C= %g (%.1f%%) V= " +WriteVal( V, 1.0 ) +"\n{{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
ThisStyle = styleCandle;
ThisTitle = "";
_O=O; _C=C; _H=H; _L=L;
ThisColor = IIf( _C>_O, cBull, IIf(_C<_O, CBear, CLine));
switch (pStyle )
{
case "Solid Candle":
SetBarFillColor( ThisColor );
break;
case "Bar":
ThisStyle = styleBar;
break;
case "Line":
ThisStyle = styleLine;
ThisColor = cLine;
break;
case "Heikin-Ashi":
_C = (O+H+L+C)/4;
_O = AMA( Ref( _C, -1 ), 0.5 );
_H = Max( H, Max( _C, _O ) );
_L = Min( L, Min( _C, _O ) );
ThisColor = IIf(_C >= _O,CBull, CBear);
SetBarFillColor( ThisColor );
ThisColor = IIf(_C >= _O,cLine, cLine);
ThisTitle = "Heikin-Ashi";
break;
default:
SetBarFillColor( ThisColor );
ThisColor = cLine;
break;
}
PlotOHLC( _O, _H, _L, _C, ThisTitle, ThisColor, ThisStyle);
GraphXSpace = 8;
_SECTION_END();
/* Trend catching System
2015, Oct 19th - Trend Catching System II created by KelvinHand.
Reference Guides from
- http://www.traderji.com/metatrader/5...ng-system.html
- http://www.fxfisherman.com/forums/fo...m-perfect.html
*/
_SECTION_BEGIN("Trend Waves");
/*
Kelvinhand:
Higher Time frame ratio default to 4 to use for M15, H1, H4, D1
if current TF is 5min, and you want HTF to be 30min, then ratio htf = 30/5 = 6.
*/
htf = Param("HTF Ratio", 4, 1);
MP=(H+L)/2;
Plot( ZM=Wilders(MP,14), "", ColorRGB(105,105,105), styleNoLabel);
Plot( ZH=Wilders(H, 14), "", colorWhite, styleThick|styleNoLabel);
Plot( ZL=Wilders(L, 14), "", colorWhite, styleThick|styleNoLabel);
Plot( Wilders(H, htf*14), "", colorGrey40, styleNoLabel);
Plot( Wilders(L, htf*14), "", colorGrey40, styleNoLabel);
_SECTION_END();
_SECTION_BEGIN("Fast MAs");
a = hMA(C, 13);
b = hMA(C, 17);
clr1 = IIf(a>b, colorAqua, colorRed);
clr2 = IIf(a>b, ColorRGB(33,144,255), ColorRGB(255,0,255));
Plot( a, "", clr1, styleThick|styleNoLabel);
Plot( b, "", clr2, styleNoLabel);
_SECTION_END();
/*
_SECTION_BEGIN("Buy/Sell Arrows");
//-- Kelvinhand: This is just a sample Buy/Sell only
// Don't expect to do anything for you, do you own diligence
// I remain myself the buy/sell by manual visual inspection rather based on script.
BS1=Cross(C, ZH) AND C>a;
PlotShapes(IIf(BS1,shapeDigit0 ,0) ,colorGold, 0, L,-45);
PlotShapes(IIf(BS1,shapeUpArrow ,0) ,colorGold, 0, L,-30);
SB1=Cross(ZL, C) AND C<a;
PlotShapes(IIf(SB1,shapeDigit1 ,0) ,colorPink, 0, H,40);
PlotShapes(IIf(SB1,shapeDownArrow ,0) ,colorPink, 0, H,-30);
BS2=C>ZH AND Cross(a, C) AND zm>Ref(zm, -5);
PlotShapes(IIf(BS2,shapeDigit2 ,0) ,colorRed, 0, H,40);
PlotShapes(IIf(BS2,shapeDownArrow ,0) ,colorRed, 0, H,-30);
BS3=C>ZL AND Ref(C,-1)<=ZH AND C>=ZH AND zm>Ref(zm, -5);
PlotShapes(IIf(BS3,shapeDigit3 ,0) ,colorGold, 0, L,-45);
PlotShapes(IIf(BS3,shapeUpArrow ,0) ,colorGold, 0, L,-30);
_SECTION_END();
*/