Unity Indicator For MT5

Unity Indicator For MT5

The Unity Indicator For MT5 is used to view the synchronized movement of the currency pairs and metals in the platform. The core source code of this tool is based on a published article related to Kohonen Neural Network.

As embedded code is designed to deal with a cluster of currency pairs, the traders might get confused by seeing bands of moving average acting as the oscillator. But if you get into the settings of this indicator, you will realize how the color code represents the movement of each financial instrument. To create a simple trading process, the user should limit the use of the selected asset. But things might be getting overly complicated as the users might not remember all the color formation. However, smart currency traders often simplify the overall process by limiting the maximum number of the asset to 4.

But to bring all the necessary adjustments to the use of this unity tool, a demo account must be taken into consideration. Decipher the dynamic settings and stick the practice environment as long as you need it. But make yourself comfortable with its reading before using the tools in the real market.

FREE Unity Indicator

Download the FREE Unity Indicator for MT5.

To receive my email 100% sure: 
Put my email on your whitelist!

 

Partially Automated Trading Besides Your Day Job

Alerts In Real-Time When Divergences Occur

My Recommended MT4/MT5 Broker

 

Installing the Unity Indicator For MT5

After you downloaded the indicator via the form above you need to unzip the zip-file. Then you need to copy the file Unity.mq5 into the folder MQL5\Indicators of your MT5 installation. After that please restart MT5 and then you will be able to see the indicator in the list of indicators.

Parameters of the Unity Indicator For MT5

The Unity Indicator For MT5 has 10 parameters to configure.

input string _1 = ""; // Cluster Indicator Settings
input string Instruments = "EURUSD,GBPUSD,USDCHF,USDJPY,AUDUSD,USDCAD,NZDUSD"; // ·    Instruments
input int BarLimit = 500; // ·    BarLimit
input ENUM_DRAW_TYPE Draw = DRAW_LINE; // ·    Draw
input ENUM_APPLIED_PRICE PriceType = PRICE_CLOSE; // ·    PriceType
input bool AbsoluteValues = false; // ·    AbsoluteValues
input string _2 = ""; // Data Export to CSV
input string SaveToFile = ""; // ·    SaveToFile
input bool ShiftLastBuffer = false; // ·    ShiftLastBuffer
input int BarLookback = 1; // ·    BarLookback

Buffers of the Unity Indicator For MT5

The Unity Indicator For MT5 provides 0 buffers.

Main Parts Of The Code

    int n = OnCalculate(Bars(_Symbol, PERIOD_CURRENT), 0, 0, price);
    if(n  gt  0)
    {
      EventKillTimer();
      ChartSetSymbolPeriod(0, _Symbol, PERIOD_CURRENT);
      ChartRedraw();
    }
  }
  else
  {
    EventKillTimer();
  }
}

int OnCalculate(const int rates_total,
                const int prev_calculated,
                const int begin,
                const double& price[])
{
  if(!initDone) return 0;
  
  if(LastBarCount == rates_total && prev_calculated == rates_total && PriceType != PRICE_CLOSE)
  {
    return prev_calculated;
  }
  
  if(prev_calculated == 0)
  {
    for(int i = 0; i  lt  rates_total; i++)
    {
      for(int j = 0; j  lt  BUF_NUM; j++)
      {
        buffers[j][i] = EMPTY_VALUE;
      }
    }
  }
  
  int limit = MathMin(rates_total - prev_calculated + 1, BarLimit);

  for(int i = 0; i  lt  limit; i++)
  {
    if(!calculate(i))
    {
      return 0; // will retry on next tick
    }
  }
  
  static bool fileSaved = SaveToFile == "";
  if(!fileSaved && !AbsoluteValues)
  {
    SaveBuffersToFile(SaveToFile);
    fileSaved = true;
  }
  
  LastBarCount = rates_total;
  
  return LastBarCount;
}

double GetBuffer(int index, int bar)
{
  return getter[index][bar];
}

bool SaveBuffersToFile(const string filename)
{
  int h = FileOpen(filename, FILE_WRITE | FILE_CSV | FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_ANSI,  ; );
  if(h == INVALID_HANDLE) return false;
  
  string line = "datetime";
  for(int k = BarLookback - 1; k  gt = 0; k--)
  {
    for(int i = 0; i  lt  workCurrencies.getSize(); i++)
    {
      line += ";" + workCurrencies.getKey(i) + (string)(k + 1);
    }
  }
  if(ShiftLastBuffer)
  {
    line += ";FORECAST";
  }
  FileWriteString(h, line + "
");

  for(int i = BarLimit - BarLookback; i  gt = (ShiftedBuffer  gt  -1 ? 1 : 0); i--)
  {
    datetime time[1];
    CopyXYZN(Time, i, 1, time);
    line = (string)time[0];
    for(int k = BarLookback - 1; k  gt = 0; k--)
    {
      for(int j = 0; j  lt  workCurrencies.getSize(); j++)
      {
        line += ";" + (string)GetBuffer(j, i + k);
      }
    }
    if(ShiftLastBuffer)
    {
      line += ";" + (string)GetBuffer(ShiftedBuffer, i - 1); // look into the future for 1 bar
    }
    FileWriteString(h, line + "
");
  }
  
  FileClose(h);

  Print("File saved ", filename);
  return true;
}

 

About Me

I'm Mike Semlitsch the owner of PerfectTrendSystem.com. My trading career started in 2007. Since 2013 I have helped thousands of traders to take their trading to the next level. Many of them are now constantly profitable traders. 

The following performance was achieved by me while trading live in front of hundreds of my clients:

Connect With Me:  

This FREE Indicator Can Transform
Your Trading!

FREE Indicator + Telegram Group


Request the Ultimate Double Top/Bottom Indicator which is used by 10,000+ traders.

Results From 5 Months!
This service starts soon! Be the first who get's notified when it begins!