On tradestation it is called NickMBigMove, here is the code for it but i need to have it transformed into java so i can use it in esignal
Inputs: {------------------------------------------------}
Price(Close),
Length(20), { Length for Average True Range (ATR) & Std. Deviation (SD) Calcs }
nK(1.5), { Keltner Channel ATRs from Average }
nBB(2), { Bollinger Band Std. Devs. from Average }
AlertLine( 1 ), { BBS_Index level at which to issue alerts }
NormalColor( Red ), { Normal color for BBS_Ind }
AlertlColor( Cyan ) { Color for BBS_Ind below alert line }
;
Variables: {---------------------------------------------}
ATR(0), { Average True Range }
SDev(0), { Standard Deviation }
BBS_Ind(0), { Bollinger Band Squeeze Indicator }
alertTextID(-1)
;
if barnumber = 1 and alertTextID = -1 then
alertTextID = Text_New(date,time,0,"dummy");
{-- Calculate BB Squeeze Indicator ----------------------}
ATR = AvgTrueRange(Length);
SDev = StandardDev(Price, Length, 1);
BBS_Ind = (nBB * SDev) / (nK * ATR);
{-- Plot the Index & Alert Line -------------------------}
Plot1(BBS_Ind, "BBS_Ind");
Plot2(AlertLine, "AlertLine");
If Plot1 < Plot2 then
SetPlotColor(1, NormalColor)
else
SetPlotColor(1, AlertlColor);
{-- Plot delta of price from Donchina mid line ----------}
value2 = LinearRegValue(Price-((Highest(H,Length)+Lowest(L,Length))/2
+
xAverage(Price,Length))/2,
Length,0);
var:color(0); color = yellow;
if value2>0 then color = green;
if value2<0 then color = red;
plot3(value2,"nickmNxtMove",color);
{-- Issue Alert when the Squeeze is On ------------------}
if BBS_Ind crosses below AlertLine
and Text_GetTime(alertTextID) <> time then begin
text_setLocation(alertTextID, date, time, 0);
Alert("BB Squeeze Alert");
end;
Inputs: {------------------------------------------------}
Price(Close),
Length(20), { Length for Average True Range (ATR) & Std. Deviation (SD) Calcs }
nK(1.5), { Keltner Channel ATRs from Average }
nBB(2), { Bollinger Band Std. Devs. from Average }
AlertLine( 1 ), { BBS_Index level at which to issue alerts }
NormalColor( Red ), { Normal color for BBS_Ind }
AlertlColor( Cyan ) { Color for BBS_Ind below alert line }
;
Variables: {---------------------------------------------}
ATR(0), { Average True Range }
SDev(0), { Standard Deviation }
BBS_Ind(0), { Bollinger Band Squeeze Indicator }
alertTextID(-1)
;
if barnumber = 1 and alertTextID = -1 then
alertTextID = Text_New(date,time,0,"dummy");
{-- Calculate BB Squeeze Indicator ----------------------}
ATR = AvgTrueRange(Length);
SDev = StandardDev(Price, Length, 1);
BBS_Ind = (nBB * SDev) / (nK * ATR);
{-- Plot the Index & Alert Line -------------------------}
Plot1(BBS_Ind, "BBS_Ind");
Plot2(AlertLine, "AlertLine");
If Plot1 < Plot2 then
SetPlotColor(1, NormalColor)
else
SetPlotColor(1, AlertlColor);
{-- Plot delta of price from Donchina mid line ----------}
value2 = LinearRegValue(Price-((Highest(H,Length)+Lowest(L,Length))/2
+
xAverage(Price,Length))/2,
Length,0);
var:color(0); color = yellow;
if value2>0 then color = green;
if value2<0 then color = red;
plot3(value2,"nickmNxtMove",color);
{-- Issue Alert when the Squeeze is On ------------------}
if BBS_Ind crosses below AlertLine
and Text_GetTime(alertTextID) <> time then begin
text_setLocation(alertTextID, date, time, 0);
Alert("BB Squeeze Alert");
end;