WCCIPatternLabels

Download script
Author: Cubesteak
WCCIPatternLabels

The WCCI Pattern Labels script is a specialized visual aid designed for traders who use "Woodies CCI" indicators. Rather than performing complex mathematical calculations or generating buy/sell signals itself, this tool serves as a static reference guide. It simplifies your trading workspace by clearly defining the various trade types associated with different Woodies Patterns.

Core Functionality

The script automatically creates a dedicated sub-window on your trading platform. Inside this window, it displays a neatly organized list of eight specific labels. These labels identify key trading patterns, such as "Zero-Line Reject," "Shamu Trade," and "Vegas Trade," while simultaneously noting whether each pattern is intended for trend following or counter-trend trading.

Key Features & Logic

  • Dynamic Layout Organization: The script includes built-in logic to arrange the text in different layouts based on your preferences. You can choose between a single column or a double-column format, which prevents the information from cluttering your screen.
  • Customizable Placement: Users can specify which corner of the window the labels should appear in (Upper Left, Upper Right, Bottom Left, or Bottom Right). The script automatically calculates the necessary spacing to ensure that the text is neatly aligned and readable regardless of the chosen corner.
  • Visual Customization: To ensure the labels match your specific trading setup, the script allows for easy adjustments of:
    • Text Color: Choose a color that best contrasts with your background.
    • Font Size: Scale the text up or down to suit your monitor resolution.
    • Offsets: Fine-tune the exact positioning (X and Y coordinates) of the labels to provide a clean look.

Summary for the User

Think of this script as a permanent "cheat sheet" on your chart. By providing clear definitions for Woodies CCI trade types in one consolidated view, it removes the need for traders to constantly reference external websites or documentation, allowing for faster decision-making during active trading sessions.

9 Views
0 Downloads
0 Favorites
WCCIPatternLabels
//+------------------------------------------------------------------+
//|                                          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);
  }
//+------------------------------------------------------------------+

Comments