.

Next Move Signal Trading System - Amibroker AFL Code

Click Image To Enlarge. Please Rate And Comment.

Next Move Signal Trading System

_SECTION_BEGIN("BB squeeze");


Length = 8;
Price = EMA(Close, Length);

// Keltner 
kLength = Length;
kN = 1.5;
kATR = ATR(kLength);
kUpper = Price + kN * kATR;
kLower = Price - kN * kATR;

// Bollinger
bbLength = Length;
bbN = 2;
bbStDevValues = StDev(Close, bbLength);
bbUpper = Price + bbN * bbStDevValues;
bbLower = Price - bbN * bbStDevValues;

IsSignal = 
 bbUpper <= kUpper AND
 bbLower >= kLower;

Graph0 = 1;
Graph0Style = styleDots;
Graph0BarColor = IIf(IsSignal, colorRed, colorGreen);

Proportion = (kUpper - kLower) / (bbUpper - bbLower);
Graph1 = Proportion;

Title = "Next Move Signal. In squeeze: " + WriteVal(IsSignal, 1) + " Keltner/Bollinger: " + WriteVal(Proportion);
_SECTION_END();
Previous Post Next Post