• 概述
  • 评论
  • 评论 (2)
  • 新特性

Just Waves

Among various methods of technical analysis of the Forex market, wave analysis used to be the basic one. Anyway, when it comes to the price change over a period of time, we are dealing with waves. According to Elliott's theory, waves are formed in a fractal way. On the same principle MT4 indicator "Just Waves" marks up waves of different levels (up to 8) and creates graphic lines that indicate the beginning and ending points of the waves.

"Just Waves" offers an objective criterion of a wave, thereby uncovering tremendous opportunities not only for traders but also for programmers, developers of trading systems and analyzers. It was created in order to help people get rid of routine actions the robot is able to do as much as possible, and focus attention on the decision-making process.


Recommendations and operation principle:

  • It is recommended to use accounts with 4-digit quotes.  
  • The indicator builds waves based on the current timeframe.
  • Timeframe changing sometimes requires to switch to it once again for correct waves building.
  • In some cases on the first wave level indicator creates multiple trend lines on top of each other instead of one.


Settings

  • Level - number of wave levels (0-7)
  • WaveName - the major name of a single wave (default "Wave")
  • VLine - if true, the indicator starts working from the bar, which has a vertical line
  • VLineName - name of the vertical line (default "1")
  • SelectableWaves - opportunity to remove the selection by clicking waves and to hide them from the list of objects. 
  • WavesOnBackground -  opportunity to draw waves in the background.
  • You can also set the color and width of the wave lines.


Code example for waves counting:

//+------------------------------------------------------------------+
//|                                                Waves counter.mq4 |
//|                                     Copyright 2015, OysterForex. |
//|                                        http://oysterforex.esy.es |
//+------------------------------------------------------------------+
#property copyright "Copyright 2015, OysterForex"
#property link      "http://oysterforex.esy.es"
#property version   "1.00"
extern int Level=7;         // how much levels do you want
extern string Name2="Wave"; // major name of drawing wave lines
extern bool VLine=false;    // Vline
extern string Name1="1";    // Name
extern string ind_name="Market\just-waves";  // Just Waves's indicator name in "MQL4/Indicators" folder
int i6[];                   // Total waves amount
// Compile it into /mql4/Experts folder
// Current Expert Adviser works only with "Just Waves" Indicator
// The script helps to get total waves amount and stores it into i6[]
// in order later to get easily access to Vertical lines and get data from it
// such as Date1,Price1,Date2,Price2, which means the Start and the End of
// a single wave
// Sometimes, on the history only, "Just Waves 1.00" is missing to create one
// wave of the least wave level in the chain of waves
// In order to avoid this non-critical bug there is i4 integer
// checks if there is one more wave after missing one and if true
// continues counting waves

int OnInit()
  {
//---
   ArrayResize(i6,Level+1); // prepare i6 for work 
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
   string coment;
   iCustom(NULL,0,ind_name,Level,Name2,VLine,Name1,0,0);
   for(int y=Level;y>=0;y--) // circle for levels
     {
      int i2=0,i3=0,i4=0;
      for(int i=0;;i++) // circle for waves of each level
        {
         int i5=i+1;                        // i5 is number of the next wave after i
         i2=ObjectFind(0,y+Name2+i);      // returns >=0 if y+wave+i exists
         i4=ObjectFind(0,y+Name2+i5);     // returns >=0 if y+wave+i+1 exists
         if(i2<0 && i4<0) // stop if there are no waves anymore
           {
            i3--;
            break;
           }
         i3++;                             // i3 counts total amount of waves for the level
        }
      i6[y]=i3;                            // when counted global int i6[] stores it
      coment=coment+"Lvl_"+y+" - "+i6[y]+"\n";
      Comment(coment);
     }
  }
//+------------------------------------------------------------------+
无评论
版本 1.2 - 2015.05.05
Added ability to change the operation mode (Mode):
- 0: waves are drawn based on a fixed timeframe
- 1: waves are drawn based on the current timeframe
版本 1.1 - 2015.03.24
- 20 times faster initialization
- switching between timeframes/accounts implemented
- one tick drawing lag fixed
- new settings added:
1. SelectableWaves - opportunity to remove the selection by clicking waves and to hide them from the list of objects.
2. WavesOnBackground - opportunity to draw waves in the background