Author: Dan McSalley
Octaves_v4

This script is designed to provide traders with a visual roadmap of market price levels based on a mathematical concept known as Murrey Math. Its primary goal is to automatically identify and plot "octaves"—levels that represent significant psychological and structural zones in the financial markets.

How the Logic Works

1. Dynamic Price Scaling (Fractal Identification) The script first analyzes the current market price. Since different assets (like Forex, Gold, or Stocks) have vastly different price scales, it uses a "fractal" logic to determine the appropriate scale for the current chart. It checks which numerical range the price falls into and sets a corresponding "fractal" value. This ensures that whether you are trading an asset priced at 250,000 or one priced at 0.19, the visual lines will always appear at correct, proportional intervals.

2. Master Key Level Calculation Once the fractal scale is established, the script calculates a "Master Key" base. It then generates a series of major and minor price levels by dividing the price range into segments (specifically eighths). This creates a grid of significant support and resistance zones.

3. Visual Mapping & Color Coding The script automatically draws horizontal lines on your chart to represent these calculated levels. To make the data easy to read at a glance, it organizes them into distinct visual groups:

  • Master Keys: These are drawn as thick, solid lines. Each one represents a primary milestone in the current price "octave."
  • Sub-Levels: Surrounding each Master Key are thinner lines that represent smaller, more granular price targets.
  • Color Organization: The script uses specific colors (such as Yellow, Hot Pink, Lime, and Dodger Blue) to differentiate between different segments of the octave, helping you quickly distinguish between different "chapters" of market movement.

4. Real-Time Updates The logic is built to be reactive. Every time a new hourly price update occurs or the chart period changes, the script refreshes its calculations. It deletes the old lines and redraws the new ones instantly, ensuring that your visual roadmap is always perfectly aligned with the current market environment.

Price Data Components
Series array that contains open prices of each bar
2 Views
0 Downloads
0 Favorites
Octaves_v4
//+------------------------------------------------------------------+
//|                                                   Octaves_v4.mq4 |
//|Octaves v4 by Dan Mc Salley        Email:xard777@connectfree.co.uk|
//|           Based on the works of TH Murrey's MurreyMath           |
//|Please feel free to better this code & send me a copy...thanx:-)  |
//+------------------------------------------------------------------+
#property copyright " Dan McSalley "
#property link      " Created for MetaTrader 4 in 2005 "
#property indicator_chart_window
//+------------------------------------------------------------------+
//| Define the Variables to use.....                                 |
//+------------------------------------------------------------------+
   double fractal,MKL0,MKL20_Line,x=0;
   double MKL00,MKL10,MKL20,MKL30,MKL40,MKL50,MKL60,MKL70,MKL80;
   double MKL01,MKL02,MKL03,MKL04,MKL05,MKL06,MKL07,MKL08,MKL09;
   double MKL11,MKL12,MKL13,MKL14,MKL15,MKL16,MKL17;
   double MKL21,MKL22,MKL23,MKL24,MKL25,MKL26,MKL27;
   double MKL31,MKL32,MKL33,MKL34,MKL35,MKL36,MKL37;
   double MKL41,MKL42,MKL43,MKL44,MKL45,MKL46,MKL47;
   double MKL51,MKL52,MKL53,MKL54,MKL55,MKL56,MKL57;
   double MKL61,MKL62,MKL63,MKL64,MKL65,MKL66,MKL67;
   double MKL71,MKL72,MKL73,MKL74,MKL75,MKL76,MKL77,MKL81,MKL82;
int
   nTime = 0,CurPeriod = 0;
int init() {
   return(0);
  }
int deinit() {
//---- TODO: add your code here
   return(0);
  }
int start() {
//+------------------------------------------------------------------+
//| Price = the current Days hourly Open to use as x for our Fractal |
//+------------------------------------------------------------------+
if( (nTime != Time[0]) || (CurPeriod != Period()) ) {
     x = iOpen(NULL,PERIOD_H1,0);
//+------------------------------------------------------------------+
//| Finding the right Fractal from x.....                            |
//+------------------------------------------------------------------+ 
   if(x<=250000 && x>25000) fractal = 100000;
   if(x<=25000 && x>2500) fractal = 10000;
   if(x<=2500 && x>250) fractal = 1000;
   if(x<=250 && x>25) fractal = 100;
   if(x<=25 && x>12.5) fractal = 12.5;
   if(x<=12.5 && x>6.25) fractal = 12.5;
   if(x<=6.25 && x>3.125) fractal = 6.25;
   if(x<=3.125 && x>1.5625) fractal = 3.125;
   if(x<=1.5625 && x>0.390625) fractal = 1.5625;
   if(x<=0.390625 && x>0) fractal = 0.1953125;
//+------------------------------------------------------------------+
//| calculating base to start from.....                              |
//+------------------------------------------------------------------+
   MKL00 = MathFloor(x/(fractal/8))*(fractal/8);
//----------------------------------------------
   MKL01 =(MKL00 + (fractal/512));
   MKL02 =(MKL01 + (fractal/512));
   MKL03 =(MKL02 + (fractal/512));
   MKL04 =(MKL03 + (fractal/512));
   MKL05 =(MKL04 + (fractal/512));
   MKL06 =(MKL05 + (fractal/512));
   MKL07 =(MKL06 + (fractal/512));
   MKL08 =(MKL00 - (fractal/512));
   MKL09 =(MKL08 - (fractal/512));
//---- yellow 1/8th line & sub lines   
   MKL10 =(MKL00 + (fractal/64));
   MKL11 =(MKL10 + (fractal/512));
   MKL12 =(MKL11 + (fractal/512));
   MKL13 =(MKL12 + (fractal/512));
   MKL14 =(MKL13 + (fractal/512));
   MKL15 =(MKL14 + (fractal/512));
   MKL16 =(MKL15 + (fractal/512));
   MKL17 =(MKL16 + (fractal/512));
//---- pink 2/8th line & sub lines
   MKL20 =(MKL10 + (fractal/64));
   MKL21 =(MKL20 + (fractal/512));
   MKL22 =(MKL21 + (fractal/512));
   MKL23 =(MKL22 + (fractal/512));
   MKL24 =(MKL23 + (fractal/512));
   MKL25 =(MKL24 + (fractal/512));
   MKL26 =(MKL25 + (fractal/512));
   MKL27 =(MKL26 + (fractal/512));
//---- green 3/8th line & sub lines
   MKL30 =(MKL20 + (fractal/64));
   MKL31 =(MKL30 + (fractal/512));
   MKL32 =(MKL31 + (fractal/512));
   MKL33 =(MKL32 + (fractal/512));
   MKL34 =(MKL33 + (fractal/512));
   MKL35 =(MKL34 + (fractal/512));
   MKL36 =(MKL35 + (fractal/512));
   MKL37 =(MKL36 + (fractal/512));
//---- blue 4/8th line & sub lines
   MKL40 =(MKL30 + (fractal/64));
   MKL41 =(MKL40 + (fractal/512));
   MKL42 =(MKL41 + (fractal/512));
   MKL43 =(MKL42 + (fractal/512));
   MKL44 =(MKL43 + (fractal/512));
   MKL45 =(MKL44 + (fractal/512));
   MKL46 =(MKL45 + (fractal/512));
   MKL47 =(MKL46 + (fractal/512));
//---- green 5/8th line & sub lines
   MKL50 =(MKL40 + (fractal/64));
   MKL51 =(MKL50 + (fractal/512));
   MKL52 =(MKL51 + (fractal/512));
   MKL53 =(MKL52 + (fractal/512));
   MKL54 =(MKL53 + (fractal/512));
   MKL55 =(MKL54 + (fractal/512));
   MKL56 =(MKL55 + (fractal/512));
   MKL57 =(MKL56 + (fractal/512));
//---- pink 6/8th line & sub lines
   MKL60 =(MKL50 + (fractal/64));
   MKL61 =(MKL60 + (fractal/512));
   MKL62 =(MKL61 + (fractal/512));
   MKL63 =(MKL62 + (fractal/512));
   MKL64 =(MKL63 + (fractal/512));
   MKL65 =(MKL64 + (fractal/512));
   MKL66 =(MKL65 + (fractal/512));
   MKL67 =(MKL66 + (fractal/512));
//---- yellow 7/8th line & sub lines
   MKL70 =(MKL60 + (fractal/64));
   MKL71 =(MKL70 + (fractal/512));
   MKL72 =(MKL71 + (fractal/512));
   MKL73 =(MKL72 + (fractal/512));
   MKL74 =(MKL73 + (fractal/512));
   MKL75 =(MKL74 + (fractal/512));
   MKL76 =(MKL75 + (fractal/512));
   MKL77 =(MKL76 + (fractal/512));
//---- blue 8/8th line & sub lines
   MKL80 =(MKL70 + (fractal/64));
   MKL81 =(MKL80 + (fractal/512));
   MKL82 =(MKL81 + (fractal/512));
   }
//   Comment("\n","OCTAVES v4 ","\n","fractal = ",fractal,"\n","MKL00 = ",MKL00,"\n","1/8ths = ",MKL01,"\n","X = ",x);
//+------------------------------------------------------------------+
//| Drawing our On-Screen Lines and Text.....                        |
//+------------------------------------------------------------------+
   ObjectDelete("Octave_Line"); ObjectDelete("0/8ths_Line");
//----Blue 0/8th Masterkey line & sub lines      
   ObjectCreate("0/8ths_Line", OBJ_HLINE,0, CurTime(),MKL00); ObjectSet("0/8ths_Line",OBJPROP_COLOR,DodgerBlue);
   ObjectSet("0/8ths_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("0/8ths_Line",OBJPROP_WIDTH,3);
   
   ObjectCreate("MKL00_Line", OBJ_TEXT,0, CurTime(),MKL00); ObjectSetText("MKL00_Line", "[0/8ths]                  ", 10, "Arial", White);
               
   ObjectCreate("MKL01_Line", OBJ_HLINE,0, CurTime(),MKL01); ObjectSet("MKL01_Line",OBJPROP_COLOR,Yellow);
   ObjectSet("MKL01_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL01_Line",OBJPROP_WIDTH,0);
   
   ObjectCreate("MKL02_Line", OBJ_HLINE,0, CurTime(),MKL02); ObjectSet("MKL02_Line",OBJPROP_COLOR,HotPink);
   ObjectSet("MKL02_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL02_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL03_Line", OBJ_HLINE,0, CurTime(),MKL03); ObjectSet("MKL03_Line",OBJPROP_COLOR,Lime);
   ObjectSet("MKL03_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL03_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL04_Line", OBJ_HLINE,0, CurTime(),MKL04); ObjectSet("MKL04_Line",OBJPROP_COLOR,DodgerBlue);
   ObjectSet("MKL04_Line",OBJPROP_STYLE,STYLE_DASH); ObjectSet("MKL04_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL05_Line", OBJ_HLINE,0, CurTime(),MKL05); ObjectSet("MKL05_Line",OBJPROP_COLOR,Lime);
   ObjectSet("MKL05_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL05_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL06_Line", OBJ_HLINE,0, CurTime(),MKL06); ObjectSet("MKL06_Line",OBJPROP_COLOR,HotPink);
   ObjectSet("MKL06_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL06_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL07_Line", OBJ_HLINE,0, CurTime(),MKL07); ObjectSet("MKL07_Line",OBJPROP_COLOR,Yellow);
   ObjectSet("MKL07_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL07_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL08_Line", OBJ_HLINE,0, CurTime(),MKL08); ObjectSet("MKL08_Line",OBJPROP_COLOR,Yellow);
   ObjectSet("MKL08_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL08_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL09_Line", OBJ_HLINE,0, CurTime(),MKL09); ObjectSet("MKL09_Line",OBJPROP_COLOR,HotPink);
   ObjectSet("MKL09_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL09_Line",OBJPROP_WIDTH,0);
//----Yellow 1/8th Masterkey line & sub lines        
   ObjectCreate("1/8ths_Line", OBJ_HLINE,0, CurTime(),MKL10); ObjectSet("1/8ths_Line",OBJPROP_COLOR,Yellow);
   ObjectSet("1/8ths_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("1/8ths_Line",OBJPROP_WIDTH,3);
   
   ObjectCreate("MKL10_Line", OBJ_TEXT,0, CurTime(),MKL10); ObjectSetText("MKL10_Line", "[1/8ths]                 ", 10, "Arial", White);
   
   ObjectCreate("MKL11_Line", OBJ_HLINE,0, CurTime(),MKL11); ObjectSet("MKL11_Line",OBJPROP_COLOR,Yellow);
   ObjectSet("MKL11_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL11_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL12_Line", OBJ_HLINE,0, CurTime(),MKL12); ObjectSet("MKL12_Line",OBJPROP_COLOR,HotPink);
   ObjectSet("MKL12_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL12_Line",OBJPROP_WIDTH,0);
   
   ObjectCreate("MKL13_Line", OBJ_HLINE,0, CurTime(),MKL13); ObjectSet("MKL13_Line",OBJPROP_COLOR,Lime);
   ObjectSet("MKL13_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL13_Line",OBJPROP_WIDTH,0);
   
   ObjectCreate("MKL14_Line", OBJ_HLINE,0, CurTime(),MKL14); ObjectSet("MKL14_Line",OBJPROP_COLOR,DodgerBlue);
   ObjectSet("MKL14_Line",OBJPROP_STYLE,STYLE_DASH); ObjectSet("MKL14_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL15_Line", OBJ_HLINE,0, CurTime(),MKL15); ObjectSet("MKL15_Line",OBJPROP_COLOR,Lime);
   ObjectSet("MKL15_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL15_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL16_Line", OBJ_HLINE,0, CurTime(),MKL16); ObjectSet("MKL16_Line",OBJPROP_COLOR,HotPink);
   ObjectSet("MKL16_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL16_Line",OBJPROP_WIDTH,0);
   
   ObjectCreate("MKL17_Line", OBJ_HLINE,0, CurTime(),MKL17); ObjectSet("MKL17_Line",OBJPROP_COLOR,Yellow);
   ObjectSet("MKL17_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL17_Line",OBJPROP_WIDTH,0);
//----Pink 2/8th Masterkey line & sub lines
   ObjectCreate("2/8ths_Line", OBJ_HLINE,0, CurTime(),MKL20); ObjectSet("2/8ths_Line",OBJPROP_COLOR,HotPink);
   ObjectSet("2/8ths_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("2/8ths_Line",OBJPROP_WIDTH,3);
              
   ObjectCreate("MKL20_Line", OBJ_TEXT,0, CurTime(),MKL20); ObjectSetText("MKL20_Line", "[2/8ths]                 ", 10, "Arial", White);
   
   ObjectCreate("MKL21_Line", OBJ_HLINE,0, CurTime(),MKL21); ObjectSet("MKL21_Line",OBJPROP_COLOR,Yellow);
   ObjectSet("MKL21_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL21_Line",OBJPROP_WIDTH,0);
   
   ObjectCreate("MKL22_Line", OBJ_HLINE,0, CurTime(),MKL22); ObjectSet("MKL22_Line",OBJPROP_COLOR,HotPink);
   ObjectSet("MKL22_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL22_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL23_Line", OBJ_HLINE,0, CurTime(),MKL23); ObjectSet("MKL23_Line",OBJPROP_COLOR,Lime);
   ObjectSet("MKL23_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL23_Line",OBJPROP_WIDTH,0);
      
   ObjectCreate("MKL24_Line", OBJ_HLINE,0, CurTime(),MKL24); ObjectSet("MKL24_Line",OBJPROP_COLOR,DodgerBlue);
   ObjectSet("MKL24_Line",OBJPROP_STYLE,STYLE_DASH); ObjectSet("MKL24_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL25_Line", OBJ_HLINE,0, CurTime(),MKL25); ObjectSet("MKL25_Line",OBJPROP_COLOR,Lime);
   ObjectSet("MKL25_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL25_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL26_Line", OBJ_HLINE,0, CurTime(),MKL26); ObjectSet("MKL26_Line",OBJPROP_COLOR,HotPink);
   ObjectSet("MKL26_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL26_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL27_Line", OBJ_HLINE,0, CurTime(),MKL27); ObjectSet("MKL27_Line",OBJPROP_COLOR,Yellow);
   ObjectSet("MKL27_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL27_Line",OBJPROP_WIDTH,0);
//---- Green 3/8th MasterKey line & sub lines
   ObjectCreate("3/8ths_Line", OBJ_HLINE,0, CurTime(),MKL30); ObjectSet("3/8ths_Line",OBJPROP_COLOR,Lime);
   ObjectSet("3/8ths_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("3/8ths_Line",OBJPROP_WIDTH,3);
   
   ObjectCreate("MKL30_Line", OBJ_TEXT,0, CurTime(),MKL30); ObjectSetText("MKL30_Line", "[3/8ths]                  ", 10, "Arial", White);
      
   ObjectCreate("MKL31_Line", OBJ_HLINE,0, CurTime(),MKL31); ObjectSet("MKL31_Line",OBJPROP_COLOR,Yellow);
   ObjectSet("MKL31_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL31_Line",OBJPROP_WIDTH,0);
   
   ObjectCreate("MKL32_Line", OBJ_HLINE,0, CurTime(),MKL32); ObjectSet("MKL32_Line",OBJPROP_COLOR,HotPink);
   ObjectSet("MKL32_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL32_Line",OBJPROP_WIDTH,0);
   
   ObjectCreate("MKL33_Line", OBJ_HLINE,0, CurTime(),MKL33); ObjectSet("MKL33_Line",OBJPROP_COLOR,Lime);
   ObjectSet("MKL33_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL33_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL34_Line", OBJ_HLINE,0, CurTime(),MKL34); ObjectSet("MKL34_Line",OBJPROP_COLOR,DodgerBlue);
   ObjectSet("MKL34_Line",OBJPROP_STYLE,STYLE_DASH); ObjectSet("MKL34_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL35_Line", OBJ_HLINE,0, CurTime(),MKL35); ObjectSet("MKL35_Line",OBJPROP_COLOR,Lime);
   ObjectSet("MKL35_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL35_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL36_Line", OBJ_HLINE,0, CurTime(),MKL36); ObjectSet("MKL36_Line",OBJPROP_COLOR,HotPink);
   ObjectSet("MKL36_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL36_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL37_Line", OBJ_HLINE,0, CurTime(),MKL37); ObjectSet("MKL37_Line",OBJPROP_COLOR,Yellow);
   ObjectSet("MKL37_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL37_Line",OBJPROP_WIDTH,0);
//---- blue 4/8th MasterKey line & sub lines
   ObjectCreate("4/8ths_Line", OBJ_HLINE,0, CurTime(),MKL40); ObjectSet("4/8ths_Line",OBJPROP_COLOR,DodgerBlue);
   ObjectSet("4/8ths_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("4/8ths_Line",OBJPROP_WIDTH,3);
   
   ObjectCreate("MKL40_Line", OBJ_TEXT,0, CurTime(),MKL40); ObjectSetText("MKL40_Line", "[4/8ths]                  ", 10, "Arial", White);
   
   ObjectCreate("MKL41_Line", OBJ_HLINE,0, CurTime(),MKL41); ObjectSet("MKL41_Line",OBJPROP_COLOR,Yellow);
   ObjectSet("MKL41_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL41_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL42_Line", OBJ_HLINE,0, CurTime(),MKL42); ObjectSet("MKL42_Line",OBJPROP_COLOR,HotPink);
   ObjectSet("MKL42_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL42_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL43_Line", OBJ_HLINE,0, CurTime(),MKL43); ObjectSet("MKL43_Line",OBJPROP_COLOR,Lime);
   ObjectSet("MKL43_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL43_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL44_Line", OBJ_HLINE,0, CurTime(),MKL44); ObjectSet("MKL44_Line",OBJPROP_COLOR,DodgerBlue);
   ObjectSet("MKL44_Line",OBJPROP_STYLE,STYLE_DASH); ObjectSet("MKL44_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL45_Line", OBJ_HLINE,0, CurTime(),MKL45); ObjectSet("MKL45_Line",OBJPROP_COLOR,Lime);
   ObjectSet("MKL45_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL45_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL46_Line", OBJ_HLINE,0, CurTime(),MKL46); ObjectSet("MKL46_Line",OBJPROP_COLOR,HotPink);
   ObjectSet("MKL46_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL46_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL47_Line", OBJ_HLINE,0, CurTime(),MKL47); ObjectSet("MKL47_Line",OBJPROP_COLOR,Yellow);
   ObjectSet("MKL47_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL47_Line",OBJPROP_WIDTH,0);
//---- green 5/8th MasterKey line & sub lines
   ObjectCreate("5/8ths_Line", OBJ_HLINE,0, CurTime(),MKL50); ObjectSet("5/8ths_Line",OBJPROP_COLOR,Lime);
   ObjectSet("5/8ths_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("5/8ths_Line",OBJPROP_WIDTH,3);
   
   ObjectCreate("MKL50_Line", OBJ_TEXT,0, CurTime(),MKL50); ObjectSetText("MKL50_Line", "[5/8ths]                  ", 10, "Arial", White);
   
   ObjectCreate("MKL51_Line", OBJ_HLINE,0, CurTime(),MKL51); ObjectSet("MKL51_Line",OBJPROP_COLOR,Yellow);
   ObjectSet("MKL51_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL51_Line",OBJPROP_WIDTH,0);
   
   ObjectCreate("MKL52_Line", OBJ_HLINE,0, CurTime(),MKL52); ObjectSet("MKL52_Line",OBJPROP_COLOR,HotPink);
   ObjectSet("MKL52_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL52_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL53_Line", OBJ_HLINE,0, CurTime(),MKL53); ObjectSet("MKL53_Line",OBJPROP_COLOR,Lime);
   ObjectSet("MKL53_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL53_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL54_Line", OBJ_HLINE,0, CurTime(),MKL54); ObjectSet("MKL54_Line",OBJPROP_COLOR,DodgerBlue);
   ObjectSet("MKL54_Line",OBJPROP_STYLE,STYLE_DASH); ObjectSet("MKL54_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL55_Line", OBJ_HLINE,0, CurTime(),MKL55); ObjectSet("MKL55_Line",OBJPROP_COLOR,Lime);
   ObjectSet("MKL55_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL55_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL56_Line", OBJ_HLINE,0, CurTime(),MKL56); ObjectSet("MKL56_Line",OBJPROP_COLOR,HotPink);
   ObjectSet("MKL56_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL56_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL57_Line", OBJ_HLINE,0, CurTime(),MKL57); ObjectSet("MKL57_Line",OBJPROP_COLOR,Yellow);
   ObjectSet("MKL57_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL57_Line",OBJPROP_WIDTH,0);
//---- pink 6/8th MasterKey line & sub lines
   ObjectCreate("6/8ths_Line", OBJ_HLINE,0, CurTime(),MKL60); ObjectSet("6/8ths_Line",OBJPROP_COLOR,HotPink);
   ObjectSet("6/8ths_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("6/8ths_Line",OBJPROP_WIDTH,3);
   
   ObjectCreate("MKL60_Line", OBJ_TEXT,0, CurTime(),MKL60); ObjectSetText("MKL60_Line", "[6/8ths]                  ", 10, "Arial", White);
     
   ObjectCreate("MKL61_Line", OBJ_HLINE,0, CurTime(),MKL61); ObjectSet("MKL61_Line",OBJPROP_COLOR,Yellow);
   ObjectSet("MKL61_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL61_Line",OBJPROP_WIDTH,0);
   
   ObjectCreate("MKL62_Line", OBJ_HLINE,0, CurTime(),MKL62); ObjectSet("MKL62_Line",OBJPROP_COLOR,HotPink);
   ObjectSet("MKL62_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL62_Line",OBJPROP_WIDTH,0);
   
   ObjectCreate("MKL63_Line", OBJ_HLINE,0, CurTime(),MKL63); ObjectSet("MKL63_Line",OBJPROP_COLOR,Lime);
   ObjectSet("MKL63_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL63_Line",OBJPROP_WIDTH,0);
   
   ObjectCreate("MKL64_Line", OBJ_HLINE,0, CurTime(),MKL64); ObjectSet("MKL64_Line",OBJPROP_COLOR,DodgerBlue);
   ObjectSet("MKL64_Line",OBJPROP_STYLE,STYLE_DASH); ObjectSet("MKL64_Line",OBJPROP_WIDTH,0);
   
   ObjectCreate("MKL65_Line", OBJ_HLINE,0, CurTime(),MKL65); ObjectSet("MKL65_Line",OBJPROP_COLOR,Lime);
   ObjectSet("MKL65_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL65_Line",OBJPROP_WIDTH,0);
   
   ObjectCreate("MKL66_Line", OBJ_HLINE,0, CurTime(),MKL66); ObjectSet("MKL66_Line",OBJPROP_COLOR,HotPink);
   ObjectSet("MKL66_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL66_Line",OBJPROP_WIDTH,0);
   
   ObjectCreate("MKL67_Line", OBJ_HLINE,0, CurTime(),MKL67); ObjectSet("MKL67_Line",OBJPROP_COLOR,Yellow);
   ObjectSet("MKL67_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL67_Line",OBJPROP_WIDTH,0);
//---- yellow 7/8th MasterKey line & sub lines   
   ObjectCreate("7/8ths_Line", OBJ_HLINE,0, CurTime(),MKL70); ObjectSet("7/8ths_Line",OBJPROP_COLOR,Yellow);
   ObjectSet("7/8ths_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("7/8ths_Line",OBJPROP_WIDTH,3);
   
   ObjectCreate("MKL70_Line", OBJ_TEXT,0, CurTime(),MKL70); ObjectSetText("MKL70_Line", "[7/8ths]                  ", 10, "Arial", White);
   
   ObjectCreate("MKL71_Line", OBJ_HLINE,0, CurTime(),MKL71); ObjectSet("MKL71_Line",OBJPROP_COLOR,Yellow);
   ObjectSet("MKL71_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL71_Line",OBJPROP_WIDTH,0);
   
   ObjectCreate("MKL72_Line", OBJ_HLINE,0, CurTime(),MKL72); ObjectSet("MKL72_Line",OBJPROP_COLOR,HotPink);
   ObjectSet("MKL72_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL72_Line",OBJPROP_WIDTH,0);
   
   ObjectCreate("MKL73_Line", OBJ_HLINE,0, CurTime(),MKL73); ObjectSet("MKL73_Line",OBJPROP_COLOR,Lime);
   ObjectSet("MKL73_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL73_Line",OBJPROP_WIDTH,0);
   
   ObjectCreate("MKL74_Line", OBJ_HLINE,0, CurTime(),MKL74); ObjectSet("MKL74_Line",OBJPROP_COLOR,DodgerBlue);
   ObjectSet("MKL74_Line",OBJPROP_STYLE,STYLE_DASH); ObjectSet("MKL74_Line",OBJPROP_WIDTH,0);
   
   ObjectCreate("MKL75_Line", OBJ_HLINE,0, CurTime(),MKL75); ObjectSet("MKL75_Line",OBJPROP_COLOR,Lime);
   ObjectSet("MKL75_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL75_Line",OBJPROP_WIDTH,0);
   
   ObjectCreate("MKL76_Line", OBJ_HLINE,0, CurTime(),MKL76); ObjectSet("MKL76_Line",OBJPROP_COLOR,HotPink);
   ObjectSet("MKL76_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL76_Line",OBJPROP_WIDTH,0);
   
   ObjectCreate("MKL77_Line", OBJ_HLINE,0, CurTime(),MKL77); ObjectSet("MKL77_Line",OBJPROP_COLOR,Yellow);
   ObjectSet("MKL77_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL77_Line",OBJPROP_WIDTH,0);
//---- blue 8/8th MasterKey line & sub lines       
   ObjectCreate("8/8ths_Line", OBJ_HLINE,0, CurTime(),MKL80); ObjectSet("8/8ths_Line",OBJPROP_COLOR,DodgerBlue);
   ObjectSet("8/8ths_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("8/8ths_Line",OBJPROP_WIDTH,3);
   
   ObjectCreate("MKL80_Line", OBJ_TEXT,0, CurTime(),MKL80); ObjectSetText("MKL80_Line", "[8/8ths]                  ", 10, "Arial", White);
   
   ObjectCreate("MKL81_Line", OBJ_HLINE,0, CurTime(),MKL81); ObjectSet("MKL81_Line",OBJPROP_COLOR,Yellow);
   ObjectSet("MKL81_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL81_Line",OBJPROP_WIDTH,0);

   ObjectCreate("MKL82_Line", OBJ_HLINE,0, CurTime(),MKL82); ObjectSet("MKL82_Line",OBJPROP_COLOR,HotPink);
   ObjectSet("MKL82_Line",OBJPROP_STYLE,STYLE_SOLID); ObjectSet("MKL82_Line",OBJPROP_WIDTH,0);
//----job done - It really is that simple:-)  
   ObjectsRedraw();
   return(0);
  }
//+------------------------------------------------------------------+

Comments