EW Easy Counter Script-Motive Waves-V2
Download scriptThis script is a visual labeling tool designed to simplify how traders identify and track market structures, specifically "Motive Waves." It automates the tedious process of manually typing out wave numbers on a price chart, allowing for a much faster workflow when analyzing trends.
How it Works
The primary logic of the tool is centered around a "drag and drop" interaction. Instead of having to click through multiple menus to place an object, the script waits for you to select a point on your chart. Once you drop your cursor onto the screen, the script automatically detects that location and places a formatted text label.
Smart Sequencing
The tool is programmed with an intelligent naming system to keep your charts organized:
- Automatic Numbering: It follows a standard wave counting sequence (I, II, III, IV, and V).
- Cycle Management: It recognizes that markets move in cycles. If you have already labeled a set of waves (e.g., Wave 1 through 5), the script is smart enough to know that the next label should belong to a new cycle.
- Duplicate Prevention: Before placing any text, the script checks the chart to see if a label with that specific number already exists. If it finds an empty slot in your current counting sequence, it fills it; if the current sequence is complete, it automatically advances to the next cycle count.
Key Features for Traders
- Visual Consistency: Every label you place will maintain a uniform appearance, including a consistent font (Arial), size, and color (Turquoise), ensuring your charts remain clean and readable.
- Efficiency: By automating the naming convention, it eliminates the risk of human error—such as skipping a number or mislabeling a wave—which is essential for accurate technical analysis.
- Customization: While it handles the heavy lifting of logic and placement, it provides high-level visual settings so that the labels match your specific charting aesthetic.
//+------------------------------------------------------------------+
//| EW Labeler-Motive 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 = Turquoise;
string font = "Arial";
int fontSize = 14;
int numCycles = 100;
string wavePrefix = "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 < 5; i++ ) {//To control waves within cycle
switch ( i ) {
case 0: wavePostfix = "I";
break;
case 1: wavePostfix = "II";
break;
case 2: wavePostfix = "III";
break;
case 3: wavePostfix = "IV";
break;
case 4: wavePostfix = "V";
break;
}
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