//+------------------------------------------------------------------+ //| WCCI Pattern Labels.mq4 | //| Cubesteak | //| http://www.cubesteak.net | //| | //| Purpose: This is a silly little indicator that simply | //| adds static labels to a new window to remind you | //| what Woodies CCI trades are being called by the | //| various "Woodies Patterns" indicators that are | //| available. Check www.woodiescciclub.com for the | //| pattern descriptions and indicators. | //| | //+------------------------------------------------------------------+ #property copyright "Cubesteak" #property link "http://www.cubesteak.net/" #property indicator_separate_window #property indicator_maximum 1 #property indicator_minimum 0 //---- input parameters extern color TextColor=NavajoWhite; extern int TextColumn=2; // 1 or 2 columns extern int TextSize=8; extern int TextCorner=0; // 0=UL,1=UR,2=BL,3=BR extern int TextXOffset=10; extern int TextYOffset=15; bool first_time = false; int win_handle = -1; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators IndicatorShortName("WCCI Pattern Labels"); first_time = true; //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { //---- if (first_time){ win_handle = WindowFind("WCCI Pattern Labels"); first_time = false; int Xcol1place,Xcol2place,YCol1place,YCol2place,YCol3place,YCol4place,YCol5place,YCol6place,YCol7place,YCol8place = 0; switch (TextColumn) { case 2: switch (TextCorner) { case 0: Xcol1place = TextXOffset; Xcol2place = TextSize * 25; YCol1place = TextSize * 3; YCol2place = TextSize * 5; YCol3place = TextSize * 7; YCol4place = TextSize * 9; YCol5place = TextSize * 3; YCol6place = TextSize * 5; YCol7place = TextSize * 7; YCol8place = TextSize * 9; break; case 1: Xcol1place = TextSize * 25; Xcol2place = TextXOffset; YCol1place = TextSize * 3; YCol2place = TextSize * 5; YCol3place = TextSize * 7; YCol4place = TextSize * 9; YCol5place = TextSize * 3; YCol6place = TextSize * 5; YCol7place = TextSize * 7; YCol8place = TextSize * 9; break; case 2: Xcol1place = TextXOffset; Xcol2place = TextSize * 25; YCol1place = TextSize * 9; YCol2place = TextSize * 7; YCol3place = TextSize * 5; YCol4place = TextSize * 3; YCol5place = TextSize * 9; YCol6place = TextSize * 7; YCol7place = TextSize * 5; YCol8place = TextSize * 3; break; case 3: Xcol1place = TextSize * 25; Xcol2place = TextXOffset; YCol1place = TextSize * 9; YCol2place = TextSize * 7; YCol3place = TextSize * 5; YCol4place = TextSize * 3; YCol5place = TextSize * 9; YCol6place = TextSize * 7; YCol7place = TextSize * 5; YCol8place = TextSize * 3; break; } break; case 1: switch (TextCorner) { case 0: Xcol1place = TextXOffset; Xcol2place = TextXOffset; YCol1place = TextSize * 3; YCol2place = TextSize * 5; YCol3place = TextSize * 7; YCol4place = TextSize * 9; YCol5place = TextSize * 11; YCol6place = TextSize * 13; YCol7place = TextSize * 15; YCol8place = TextSize * 17; break; case 1: Xcol1place = TextXOffset; Xcol2place = TextXOffset; YCol1place = TextSize * 3; YCol2place = TextSize * 5; YCol3place = TextSize * 7; YCol4place = TextSize * 9; YCol5place = TextSize * 11; YCol6place = TextSize * 13; YCol7place = TextSize * 15; YCol8place = TextSize * 17; break; case 2: Xcol1place = TextXOffset; Xcol2place = TextXOffset; YCol1place = TextSize * 17; YCol2place = TextSize * 15; YCol3place = TextSize * 13; YCol4place = TextSize * 11; YCol5place = TextSize * 9; YCol6place = TextSize * 7; YCol7place = TextSize * 5; YCol8place = TextSize * 3; break; case 3: Xcol1place = TextXOffset; Xcol2place = TextXOffset; YCol1place = TextSize * 17; YCol2place = TextSize * 15; YCol3place = TextSize * 13; YCol4place = TextSize * 11; YCol5place = TextSize * 9; YCol6place = TextSize * 7; YCol7place = TextSize * 5; YCol8place = TextSize * 3; break; } break; } //ZLR Label if(!ObjectCreate("ZLR_Label", OBJ_LABEL, win_handle, 0, 0)) { Print("error: can't create label_object! code #",GetLastError()); } ObjectSet("ZLR_Label", OBJPROP_XDISTANCE, Xcol1place); ObjectSet("ZLR_Label", OBJPROP_YDISTANCE, YCol1place); ObjectSet("ZLR_Label", OBJPROP_CORNER,TextCorner); ObjectSetText("ZLR_Label", "1. Zero-Line Reject (ZLR) -- Trend",TextSize,"Arial",TextColor); //Shamu Label if(!ObjectCreate("Shamu_Label", OBJ_LABEL, win_handle, 0, 0)) { Print("error: can't create label_object! code #",GetLastError()); } ObjectSet("Shamu_Label", OBJPROP_XDISTANCE, Xcol1place); ObjectSet("Shamu_Label", OBJPROP_YDISTANCE, YCol2place); ObjectSet("Shamu_Label", OBJPROP_CORNER,TextCorner); ObjectSetText("Shamu_Label", "2. Shamu Trade -- Counter-Trend",TextSize,"Arial",TextColor); //TLB Label if(!ObjectCreate("TLB_Label", OBJ_LABEL, win_handle, 0, 0)) { Print("error: can't create label_object! code #",GetLastError()); } ObjectSet("TLB_Label", OBJPROP_XDISTANCE, Xcol1place); ObjectSet("TLB_Label", OBJPROP_YDISTANCE, YCol3place); ObjectSet("TLB_Label", OBJPROP_CORNER,TextCorner); ObjectSetText("TLB_Label", "3. TrendLine Break -- Both",TextSize,"Arial",TextColor); //Vegas Trade Label if(!ObjectCreate("VT_Label", OBJ_LABEL, win_handle, 0, 0)) { Print("error: can't create label_object! code #",GetLastError()); } ObjectSet("VT_Label", OBJPROP_XDISTANCE, Xcol1place); ObjectSet("VT_Label", OBJPROP_YDISTANCE, YCol4place); ObjectSet("VT_Label", OBJPROP_CORNER,TextCorner); ObjectSetText("VT_Label", "4. Vegas Trade -- Counter-Trend",TextSize,"Arial",TextColor); //Ghost Trade Label if(!ObjectCreate("GhostTrade_Label", OBJ_LABEL, win_handle, 0, 0)) { Print("error: can't create label_object! code #",GetLastError()); } ObjectSet("GhostTrade_Label", OBJPROP_XDISTANCE, Xcol2place); ObjectSet("GhostTrade_Label", OBJPROP_YDISTANCE, YCol5place); ObjectSet("GhostTrade_Label", OBJPROP_CORNER,TextCorner); ObjectSetText("GhostTrade_Label", "5. Ghost Trade -- Counter-Trend",TextSize,"Arial",TextColor); //Reverse Divergence Label if(!ObjectCreate("RevDiv_Label", OBJ_LABEL, win_handle, 0, 0)) { Print("error: can't create label_object! code #",GetLastError()); } ObjectSet("RevDiv_Label", OBJPROP_XDISTANCE, Xcol2place); ObjectSet("RevDiv_Label", OBJPROP_YDISTANCE, YCol6place); ObjectSet("RevDiv_Label", OBJPROP_CORNER,TextCorner); ObjectSetText("RevDiv_Label", "4. Reverse Divergence -- Trend",TextSize,"Arial",TextColor); //Hook From Extremes Label if(!ObjectCreate("HFE_Label", OBJ_LABEL, win_handle, 0, 0)) { Print("error: can't create label_object! code #",GetLastError()); } ObjectSet("HFE_Label", OBJPROP_XDISTANCE, Xcol2place); ObjectSet("HFE_Label", OBJPROP_YDISTANCE, YCol7place); ObjectSet("HFE_Label", OBJPROP_CORNER,TextCorner); ObjectSetText("HFE_Label", "5. HFE -- Counter-Trend",TextSize,"Arial",TextColor); //Exit Signal if(!ObjectCreate("WCCIExit_Label", OBJ_LABEL, win_handle, 0, 0)) { Print("error: can't create label_object! code #",GetLastError()); } ObjectSet("WCCIExit_Label", OBJPROP_XDISTANCE, Xcol2place); ObjectSet("WCCIExit_Label", OBJPROP_YDISTANCE, YCol8place); ObjectSet("WCCIExit_Label", OBJPROP_CORNER,TextCorner); ObjectSetText("WCCIExit_Label", "x. Exit Signals",TextSize,"Arial",TextColor); } //---- return(0); } //+------------------------------------------------------------------+
Sample
Analysis
Market Information Used:
Indicator Curves created:
Indicators Used:
Custom Indicators Used:
Order Management characteristics:
Other Features: