EW Easy Counter Script-Corrective Waves-V2
Download scriptThis script is designed as a streamlined visual aid for traders who perform manual wave analysis on their charts. Rather than automatically calculating trends, it serves as an interactive labeling system that allows you to organize and categorize market movements—specifically "Counter Waves"—manually with ease.
Core Functionality
The primary purpose of this tool is to simplify the process of marking sequential price actions. It automates the repetitive task of creating, naming, and formatting text labels on your chart. Instead of having to manually create a new text object every time you identify a segment of a wave, this script creates a structured environment where you can simply "drop" markers onto the specific price points you are analyzing.
How the Logic Works
The script operates based on a sequential "Cycle" logic. It understands that market waves typically occur in groups (for example, movements labeled A, B, and C). Here is how the system processes your input:
- Sequential Organization: The tool looks for the next available spot in a sequence. It starts at Cycle 0 and attempts to place labels "A," "B," and "C" in order.
- Smart Detection: Before placing a label, the script checks the chart to see if that specific label already exists. If it finds that "Counter Wave 0A" is already there, it automatically moves to the next available slot (like "0B" or "1A") until it finds an empty space.
- Dynamic Placement: The logic is designed to react to your mouse movement. It identifies exactly where you have clicked or dropped your cursor on the chart and places the corresponding label at that specific time and price coordinate.
- Automatic Formatting: Every time a new label is placed, the script automatically applies your preferred settings—such as the font size, text color, and naming convention—ensuring that all your markings remain consistent and professional in appearance without any manual adjustment needed for each click.
User Experience
For the trader, this means a much faster workflow. You can quickly map out complex price structures by clicking on your chart to "drop" labels. The script handles the "bookkeeping" of naming them correctly (e.g., ensuring you don't accidentally label two things as "A" in the same cycle), allowing you to focus entirely on your market analysis.
//+------------------------------------------------------------------+
//| EW Labeler-Corrective Waves.mq4 |
//| |
//| This tool allows you to quickly drag n' drop to count waves |
//| More free tools @ tradertools-fx.com |
//| Paul Nordin |
//| http://www.tradertools-fx.com |
//+------------------------------------------------------------------+
#property copyright "© 2011 TRADERTOOLS-FX.COM"
#property link "http://www.tradertools-fx.com"
//User Parameters
color textColor = Red;
string font = "Arial";
int fontSize = 14;
int numCycles = 100;
string wavePrefix = "Counter Wave";
string waveName, wavePostfix;
int cycle, breakTest;
//+------------------------------------------------------------------+
//| script program start function |
//+------------------------------------------------------------------+
int start() {
Comment( "TRADERTOOLS-FX.COM" );
cycle = 0;
breakTest = 0;
for ( int j = 0; j < numCycles; j++ ) {//To control cycles
for ( int i = 0; i < 3; i++ ) {//To control waves within cycle
switch ( i ) {
case 0: wavePostfix = "A";
break;
case 1: wavePostfix = "B";
break;
case 2: wavePostfix = "C";
}
waveName = StringConcatenate( wavePrefix, i, cycle );
if ( ObjectFind( waveName ) < 0 ) {
ObjectCreate( waveName, OBJ_TEXT, 0, WindowTimeOnDropped(), WindowPriceOnDropped() );
ObjectSetText( waveName, wavePostfix, fontSize, font, textColor );
breakTest += 1;
break;
}
}
if ( breakTest > 0 )
break;
else
cycle += 1;
}
return(0);
}
//+------------------------------------------------------------------+
Comments