+91-0000000000

}

Monday – Friday : 9:00 AM – 6:30 PM

CCI Woodies Style Crasher

CCI Woodies Style Crasher is a high-impact trading strategy that involves the Woodies style of trading with the Commodity Channel Index (CCI). Traders using this strategy rely on Amibroker data to spot potential market crashes and capitalize on them. The real-time Amibroker data feed is essential for timely decision-making in this aggressive trading approach.

_SECTION_BEGIN("CCI Woodies Style Crasher");
// CCI Woodies Style - Started by Wring 
// Added and Modified by Kris (crasher_FL) 
// Version: 1.015 
// Last Update: 08/01/2005 
// Additions: 
// timer, EMA angle, LSMA angle, trending indicator 
// Amibroker 4.70 
/////////////////////////////// 

// Background color
SetChartBkColor(ParamColor("Panel color ",colorBlack));

Version(4.70); 

z = CCI(14); 
z6 = CCI(6); 
CCI50_var = CCI(50); 
LSMA25 = LinearReg(C, 25 ); 
EMA34 = EMA(C,34); 
EMAVOL3 = EMA(Volume, 3); 
PI = atan(1.00) * 4; 
periods = 30; 
HighHigh = HHV(H, periods); 
LowLow = LLV(L, periods); 
range = 25 / (HighHigh - LowLow) * LowLow; 

if(SelectedValue(CCI50_var) < 0) 
{ 
CCI50Title = EncodeColor(colorRed); 
} 
else 
{ 
CCI50Title = EncodeColor(colorLime); 
} 
CCI50Title = CCI50Title + "CCI 50 = " + round(CCI50_var) + ", "; 


StopTitle = EncodeColor(colorWhite) + "STOP = " + EncodeColor(colorYellow); 
StopTitle = StopTitle + IIf(O < C, IIf((H - O) < (C - L), StrToNum(NumToStr(C - L, 4.4)), StrToNum(NumToStr(H - O, 4.4))), 
IIf((O - L) < (H - C), StrToNum(NumToStr(H - C, 4.4)), StrToNum(NumToStr(O - L, 4.4)))); 

x1_EMA34 = 0; 
x2_EMA34 = 2; 
y1_EMA34 = 0; 
y2_EMA34 = (Ref(EMA34, -2) - EMA34) / Avg * range; 

c_EMA34 = sqrt((x2_EMA34 - x1_EMA34)*(x2_EMA34 - x1_EMA34) + (y2_EMA34 - y1_EMA34)*(y2_EMA34 - y1_EMA34)); 
angle_EMA34 = round(180 * acos((x2_EMA34 - x1_EMA34)/c_EMA34) / PI); 

TitleAngleEMA34 = EncodeColor(colorWhite) + "\nEMA34 angle = "; 

angle_EMA34 = IIf(y2_EMA34 > 0, - angle_EMA34, angle_EMA34); 
if(abs(SelectedValue(angle_EMA34)) >= 25) 
{ 
TitleAngleEMA34 = TitleAngleEMA34 + EncodeColor(colorLime); 
} 
else if(abs(SelectedValue(angle_EMA34)) >= 15) 
{ 
TitleAngleEMA34 = TitleAngleEMA34 + EncodeColor(colorYellow); 
} 
else 
{ 
TitleAngleEMA34 = TitleAngleEMA34 + EncodeColor(colorRed); 
} 
TitleAngleEMA34 = TitleAngleEMA34 + angle_EMA34; 

x1_LSMA25 = 0; 
x2_LSMA25 = 2; 
y1_LSMA25 = 0; 
y2_LSMA25 = (Ref(LSMA25, -2) - LSMA25) / Avg * range; 

c_LSMA25 = sqrt((x2_LSMA25 - x1_LSMA25)*(x2_LSMA25 - x1_LSMA25) + (y2_LSMA25 - y1_LSMA25)*(y2_LSMA25 - y1_LSMA25)); 
angle_LSMA25 = round(180 * acos((x2_LSMA25 - x1_LSMA25)/c_LSMA25) / PI); 

TitleAngleLSMA25 = EncodeColor(colorWhite) + "LSMA25 angle = "; 

angle_LSMA25 = IIf(y2_LSMA25 > 0, - angle_LSMA25, angle_LSMA25); 
if(abs(SelectedValue(angle_LSMA25)) >= 25) 
{ 
TitleAngleLSMA25 = TitleAngleLSMA25 + EncodeColor(colorLime); 
} 
else if(abs(SelectedValue(angle_LSMA25)) >= 15) 
{ 
TitleAngleLSMA25 = TitleAngleLSMA25 + EncodeColor(colorYellow); 
} 
else 
{ 
TitleAngleLSMA25 = TitleAngleLSMA25 + EncodeColor(colorRed); 
} 
TitleAngleLSMA25 = TitleAngleLSMA25 + angle_LSMA25; 

TitleTrending = WriteIf((abs(angle_EMA34) >= 15) AND (abs(angle_EMA34 + angle_LSMA25) >= 50), EncodeColor(colorWhite) + ", SW = " + EncodeColor(colorLime) + "TRENDING", 
WriteIf((abs(angle_EMA34) >= 5) AND (((angle_EMA34 >= 0) AND (angle_LSMA25 >= 0)) OR ((angle_EMA34 <= 0) AND (angle_LSMA25 <= 0))) AND (abs(angle_EMA34 + angle_LSMA25) >= 30), EncodeColor(colorWhite) + ", SW = " + EncodeColor(colorYellow) + "NORMAL", 
EncodeColor(colorWhite) + ", SW = " + EncodeColor(colorRed) + "FLAT")); 

SW = IIf((abs(angle_EMA34) >= 15) AND (abs(angle_EMA34 + angle_LSMA25) >= 50), IIf(angle_LSMA25 > 0, 2, -2), 
IIf((abs(angle_EMA34) >= 5) AND (((angle_EMA34 >= 0) AND (angle_LSMA25 >= 0)) OR ((angle_EMA34 <= 0) AND (angle_LSMA25 <= 0))) AND (abs(angle_EMA34 + angle_LSMA25) >= 30), IIf(angle_LSMA25 > 0, 1, -1), 0)); 

tempnum = Now( 4 ) - TimeNum(); 
TimeRem = Interval() - ((int(tempnum[BarCount - 1] / 100) * 60) + (tempnum[BarCount - 1] - int(tempnum[BarCount - 1] / 100) * 100)); 
if (TimeRem[BarCount - 1] < 0) TimeRem = 0; 
TitleTimeRem = EncodeColor(colorBlueGrey) + "Time Remaining: "; 
MinuteVar = int(TimeRem / 60); 
SecondsVar = int(frac(TimeRem / 60) * 60); 

if (TimeRem[BarCount - 1] > 60) 
{ 
TitleTimeRem = TitleTimeRem + EncodeColor(colorWhite) + MinuteVar + ":" + WriteIf(SecondsVar > 9, "", "0") + SecondsVar; 
} 
else if (TimeRem[BarCount - 1] > 20) 
{ 
TitleTimeRem = TitleTimeRem + EncodeColor(colorYellow) + MinuteVar + ":" + WriteIf(SecondsVar > 9, "", "0") + SecondsVar; 
} 
else 
{ 
TitleTimeRem = TitleTimeRem + EncodeColor(colorLime) + MinuteVar + ":" + WriteIf(SecondsVar > 9, "", "0") + SecondsVar; 
} 

Title = "" + Name() + ", " + Interval(2) + ", " + Date() + "\n" + 
EncodeColor(colorSkyblue) + "CCI 14 = " + round(z) + EncodeColor(colorWhite) + ", " + EncodeColor(colorLightOrange) + 
"CCI 6 = " + round(z6) + EncodeColor(colorWhite) + ", " + //CCI50Title + 
StopTitle + 
// "\nC = " + C + ", H = " + H + ", L = " + L + ", O = " + O + 
TitleAngleEMA34 + EncodeColor(colorWhite) + ", " + TitleAngleLSMA25 + 
TitleTrending + EncodeColor(colorWhite) + "\nVolume = " + EncodeColor(colorYellow) + Volume + 
EncodeColor(colorWhite) + ", " + TitleTimeRem; 

// Colour the bars for Woodies Trend Following 
Plusbars = BarsSince(z < 0); 
Minusbars = BarsSince(z > 0); 
TrendBarCount = 6; 
Color[0] = colorDefault; 
Trend[0] = 0; 
for( i = 1; i < BarCount; i++ ) 
{ 
if (Plusbars[i] >= TrendBarCount) 
{ 
Trend[i] = 1; 
} 
else if (Minusbars[i] >= TrendBarCount) 
{ 
Trend[i] = -1; 
} 
else 
{ 
Trend[i] = Trend[i - 1]; 
} 

if (Trend[i] == 1) 
{ 
if (Minusbars[i] == TrendBarCount - 1) 
{ 
Color[i] = colorGold; 
} 
else if (z[i] < 0) 
{ 
Color[i] = colorDarkBlue; 
} 
else 
{ 
Color[i] = colorGreen; 
} 
} 
else if (Trend[i] == -1) 
{ 
if (Plusbars[i] == TrendBarCount - 1) 
{ 
Color[i] = colorGold; 
} 
else if (z[i] >= 0) 
{ 
Color[i] = colorDarkBlue; 
} 
else 
{ 
Color[i] = colorRed; 
} 

} 
else 
{ 
Color[i] = colorDefault; 
} 
} 

// CCI Line 
Plot(z,"CCI 14", colorSkyblue, styleLine | styleThick); 
// Turbo CCI 
Plot(z6,"CCI 6", colorLightOrange, styleLine | styleNoLabel); 
// CCI Histogram 
Plot(z,"",Color,styleHistogram | styleNoLabel); 
// CCI 50 
//Plot(CCI50_var,"CCI 50", IIf(CCI50_var < 0, colorDarkRed,colorDarkGreen), styleLine | styleNoLabel); 
// zero line 25lsma 
Plot(0,"",IIf(C > LSMA25,colorGreen,IIf(C<LSMA25,colorRed,colorTeal)), 
styleThick | styleNoLabel); 

// Set up color for the 100s, green if 34ema above red if below 
Color = IIf(C > EMA34, colorGreen, 
IIf(C == EMA34, colorTeal, colorRed)); 
// Plot the 100s 
Plot(100,"",Color,styleDots |styleNoLine | styleNoLabel | styleThick); 
Plot(-100,"",Color,styleDots |styleNoLine | styleNoLabel | styleThick); 

// Set up color for the 200s, green if 34ema above red if below 
ColorVol = IIf(EMAVOL3 > 400, colorLime, 
IIf(EMAVOL3 > 300, colorGreen, 
IIf(EMAVOL3 > 200, colorDarkGreen, colorRed))); 
// Plot the 200s 
Plot(200,"", ColorVol, styleDots | styleNoLine | styleNoLabel | styleThick); 
Plot(-200,"", ColorVol, styleDots | styleNoLine | styleNoLabel | styleThick); 

// Plot the 50s 
PlotGrid(50,colorTeal); 
PlotGrid(-50, colorTeal); 

// Plot the 200s 
PlotGrid(200, styleNoLine); 
PlotGrid(-200, styleNoLine);
_SECTION_END();

Open chat
1
Hi, how can I help you?