_TRO_FIB_Multi_1
Download scriptThis script is designed to provide a comprehensive visual overview of price action across multiple timeframes simultaneously. Instead of forcing you to switch back and forth between different charts (like the 15-minute, 1-hour, or Daily charts), it gathers relevant data from all of them and displays it in one centralized dashboard on your screen.
Core Functionality
The logic operates by scanning seven different timeframes at once. For each timeframe, it identifies the highest and lowest price points reached during the previous candle. It then calculates a specific "Fibonacci" percentage based on where the current price sits within that range.
Think of this as a "progress bar" for each timeframe: it shows you how far the price has traveled from its recent low to its recent high.
Key Features
- Multi-Timeframe Analysis: The tool tracks seven distinct periods (ranging from short-term fluctuations to long-term trends) at the same time.
- Dynamic Visual Feedback: Rather than just showing numbers, the script uses a color-coded system to represent the price position:
- Lime/Green: Indicates the price is near the top of its range.
- Yellow/Gold: Indicates a middle-ground position.
- Orange/Red: Indicates the price is nearing the bottom of its range.
- Maroon: Indicates the price is at the absolute bottom.
- Real-Time Percentage Tracking: Next to each timeframe label, the script displays the exact percentage of the move (e.g., 61.8% or 38.2%). This helps traders instantly identify "retracement" levels—key areas where the price might stall or reverse.
- Automated Dashboard Management: The script handles all the "heavy lifting" of creating, updating, and deleting the visual labels on your chart. It ensures that the dashboard remains clean and organized, automatically refreshing the colors and percentages as the market moves.
Summary for the Trader
This tool acts as a high-level "heat map" for market momentum. By glancing at the dashboard, you can quickly see if the market is overextended (reaching the Lime/Green zone) or if it is pulling back significantly (moving toward the Red/Maroon zones) across various time horizons simultaneously. It provides a snapshot of "where we are" without cluttering your main price chart with multiple extra windows.
//+------------------------------------------------------------------+
//| _TRO_FIB_Multi_1 |
//| |
//|------------------------------------------------------------------+
#property copyright ""
#property link ""
#property indicator_chart_window
//---- input parameters
//extern string myPair = "" ;
extern int myxstart=130 ;
extern int myystart=11 ;
extern int myPeriod1 = 15 ;
extern int myPeriod2 = 30 ;
extern int myPeriod3 = 60 ;
extern int myPeriod4 = 240 ;
extern int myPeriod5 = 1440 ;
extern int myPeriod6 = 10080 ;
extern int myPeriod7 = 43200 ;
double v0 = 0.764 ;
double v1 = 0.618 ;
double v2 = 0.5 ;
double v3 = 0.382 ;
double v4 = 0.236 ;
double v5 = 0.0 ;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
initGraph();
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
deleteObject();
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
string Period2Text(int TmPeriod)
{
switch (TmPeriod)
{
case PERIOD_M1 : return("M1");
case PERIOD_M5 : return("M5");
case PERIOD_M15 : return("M15");
case PERIOD_M30 : return("M30");
case PERIOD_H1 : return("H1");
case PERIOD_H4 : return("H4");
case PERIOD_D1 : return("D1");
case PERIOD_W1 : return("W1");
case PERIOD_MN1 : return("MN1");
}
return ("ERR");
}
//+---------------
double prOpen( int i, int j)
{
return (iOpen(NULL,i,j));
}
//+---------------
double prHigh( int i, int j)
{
return (iHigh(NULL,i,j));
}
//+---------------
double prLow( int i, int j)
{
return (iLow(NULL,i,j));
}
//+---------------
double prClose( int i, int j)
{
return (iClose(NULL,i,j));
}
//+---------------
int start()
{
double xhigh1 = prHigh( myPeriod1, 1 );
double xlow1 = prLow( myPeriod1, 1 );
double xclose1 = prClose( myPeriod1, 0 );
double xopen1 = prOpen( myPeriod1, 0 );
double xmid1 = ( xhigh1 + xlow1 ) * 0.5 ;
double xrange1 = xhigh1 - xlow1 ;
double xhigh2 = prHigh( myPeriod2, 1 );
double xlow2 = prLow( myPeriod2, 1 );
double xclose2 = prClose( myPeriod2, 0 );
double xopen2 = prOpen( myPeriod2, 0 );
double xmid2 = ( xhigh2 + xlow2 ) * 0.5 ;
double xrange2 = xhigh2 - xlow2 ;
double xhigh3 = prHigh( myPeriod3, 1 );
double xlow3 = prLow( myPeriod3, 1 );
double xclose3 = prClose( myPeriod3, 0 );
double xopen3 = prOpen( myPeriod3, 0 );
double xmid3 = ( xhigh3 + xlow3 ) * 0.5 ;
double xrange3 = xhigh3 - xlow3 ;
double xhigh4 = prHigh( myPeriod4, 1 );
double xlow4 = prLow( myPeriod4, 1 );
double xclose4 = prClose( myPeriod4, 0 );
double xopen4 = prOpen( myPeriod4, 0 );
double xmid4 = ( xhigh4 + xlow4 ) * 0.5 ;
double xrange4 = xhigh4 - xlow4 ;
double xhigh5 = prHigh( myPeriod5, 1 );
double xlow5 = prLow( myPeriod5, 1 );
double xclose5 = prClose( myPeriod5, 0 );
double xopen5 = prOpen( myPeriod5, 0 );
double xmid5 = ( xhigh5 + xlow5 ) * 0.5 ;
double xrange5 = xhigh5 - xlow5 ;
double xhigh6 = prHigh( myPeriod6, 1 );
double xlow6 = prLow( myPeriod6, 1 );
double xclose6 = prClose( myPeriod6, 0 );
double xopen6 = prOpen( myPeriod6, 0 );
double xmid6 = ( xhigh6 + xlow6 ) * 0.5 ;
double xrange6 = xhigh6 - xlow6 ;
double xhigh7 = prHigh( myPeriod7, 1 );
double xlow7 = prLow( myPeriod7, 1 );
double xclose7 = prClose( myPeriod7, 0 );
double xopen7 = prOpen( myPeriod7, 0 );
double xmid7 = ( xhigh7 + xlow7 ) * 0.5 ;
double xrange7 = xhigh7 - xlow7 ;
double xfib1 = (xclose1 - xlow1 ) / xrange1 ;
double xfib2 = (xclose2 - xlow2 ) / xrange2 ;
double xfib3 = (xclose3 - xlow3 ) / xrange3 ;
double xfib4 = (xclose4 - xlow4 ) / xrange4 ;
double xfib5 = (xclose5 - xlow5 ) / xrange5 ;
double xfib6 = (xclose6 - xlow6 ) / xrange6 ;
double xfib7 = (xclose7 - xlow7 ) / xrange7 ;
objectBlank();
paintCol1(xfib1);
paintCol2(xfib2);
paintCol3(xfib3);
paintCol4(xfib4);
paintCol5(xfib5);
paintCol6(xfib6);
paintCol7(xfib7);
paintLine();
//----
return(0);
}
//+------------------------------------------------------------------+
void initGraph()
{
deleteObject();
int xstart=myxstart, xinc=20;
int ystart=myystart, yinc=8;
int ystart1=ystart+yinc;
int ystart2=ystart+yinc*2;
int ystart3=ystart+yinc*3;
int ystart4=ystart+yinc*4;
int ystart5=ystart+yinc*5;
objectCreate("Fib1_0",xstart,ystart5);
objectCreate("Fib1_1",xstart,ystart4);
objectCreate("Fib1_2",xstart,ystart3);
objectCreate("Fib1_3",xstart,ystart2);
objectCreate("Fib1_4",xstart,ystart1);
objectCreate("Fib1_5",xstart,ystart);
objectCreate("Fib1",xstart+2,ystart+1,Period2Text(myPeriod1),7,"Arial Narrow",SkyBlue);
objectCreate("Fib1p",xstart+4,ystart+10,DoubleToStr(9,1),8,"Arial Narrow",Silver);
int xstart2 = xstart - xinc ;
objectCreate("Fib2_0",xstart2,ystart5);
objectCreate("Fib2_1",xstart2,ystart4);
objectCreate("Fib2_2",xstart2,ystart3);
objectCreate("Fib2_3",xstart2,ystart2);
objectCreate("Fib2_4",xstart2,ystart1);
objectCreate("Fib2_5",xstart2,ystart);
objectCreate("Fib2",xstart2+2,ystart+1,Period2Text(myPeriod2),7,"Arial Narrow",SkyBlue);
objectCreate("Fib2p",xstart2+4,ystart+10,DoubleToStr(9,1),8,"Arial Narrow",Silver);
int xstart3 = xstart2 - xinc ;
objectCreate("Fib3_0",xstart3,ystart5);
objectCreate("Fib3_1",xstart3,ystart4);
objectCreate("Fib3_2",xstart3,ystart3);
objectCreate("Fib3_3",xstart3,ystart2);
objectCreate("Fib3_4",xstart3,ystart1);
objectCreate("Fib3_5",xstart3,ystart);
objectCreate("Fib3",xstart3+2,ystart+1,Period2Text(myPeriod3),7,"Arial Narrow",SkyBlue);
objectCreate("Fib3p",xstart3+4,ystart+10,DoubleToStr(9,1),8,"Arial Narrow",Silver);
int xstart4 = xstart3 - xinc ;
objectCreate("Fib4_0",xstart4,ystart5);
objectCreate("Fib4_1",xstart4,ystart4);
objectCreate("Fib4_2",xstart4,ystart3);
objectCreate("Fib4_3",xstart4,ystart2);
objectCreate("Fib4_4",xstart4,ystart1);
objectCreate("Fib4_5",xstart4,ystart);
objectCreate("Fib4",xstart4+2,ystart+1,Period2Text(myPeriod4),7,"Arial Narrow",SkyBlue);
objectCreate("Fib4p",xstart4+4,ystart+10,DoubleToStr(9,1),8,"Arial Narrow",Silver);
int xstart5 = xstart4 - xinc ;
objectCreate("Fib5_0",xstart5,ystart5);
objectCreate("Fib5_1",xstart5,ystart4);
objectCreate("Fib5_2",xstart5,ystart3);
objectCreate("Fib5_3",xstart5,ystart2);
objectCreate("Fib5_4",xstart5,ystart1);
objectCreate("Fib5_5",xstart5,ystart);
objectCreate("Fib5",xstart5+2,ystart+1,Period2Text(myPeriod5),7,"Arial Narrow",SkyBlue);
objectCreate("Fib5p",xstart5+4,ystart+10,DoubleToStr(9,1),8,"Arial Narrow",Silver);
int xstart6 = xstart5 - xinc ;
objectCreate("Fib6_0",xstart6,ystart5);
objectCreate("Fib6_1",xstart6,ystart4);
objectCreate("Fib6_2",xstart6,ystart3);
objectCreate("Fib6_3",xstart6,ystart2);
objectCreate("Fib6_4",xstart6,ystart1);
objectCreate("Fib6_5",xstart6,ystart);
objectCreate("Fib6",xstart6+2,ystart+1,Period2Text(myPeriod6),7,"Arial Narrow",SkyBlue);
objectCreate("Fib6p",xstart6+4,ystart+10,DoubleToStr(9,1),8,"Arial Narrow",Silver);
int xstart7 = xstart6 - xinc ;
objectCreate("Fib7_0",xstart7,ystart5);
objectCreate("Fib7_1",xstart7,ystart4);
objectCreate("Fib7_2",xstart7,ystart3);
objectCreate("Fib7_3",xstart7,ystart2);
objectCreate("Fib7_4",xstart7,ystart1);
objectCreate("Fib7_5",xstart7,ystart);
objectCreate("Fib7",xstart7+2,ystart+1,Period2Text(myPeriod7),7,"Arial Narrow",SkyBlue);
objectCreate("Fib7p",xstart7+4,ystart+10,DoubleToStr(9,1),8,"Arial Narrow",Silver);
objectCreate("line97",xstart7,ystart+70,"-----------------------------------",10,"Arial",DimGray);
objectCreate("FibMulti1",xstart7,ystart-10,"»»» FIB MULTI © «««",8,"Arial Narrow",DimGray);
}
//+------------------------------------------------------------------+
void objectCreate(string name,int x,int y,string text="-",int size=42,
string font="Arial",color colour=CLR_NONE)
{
ObjectCreate(name,OBJ_LABEL,0,0,0);
ObjectSet(name,OBJPROP_CORNER,3);
ObjectSet(name,OBJPROP_COLOR,colour);
ObjectSet(name,OBJPROP_XDISTANCE,x);
ObjectSet(name,OBJPROP_YDISTANCE,y);
ObjectSetText(name,text,size,font,colour);
}
void deleteObject()
{
ObjectDelete("Fib1_0");
ObjectDelete("Fib1_1");
ObjectDelete("Fib1_2");
ObjectDelete("Fib1_3");
ObjectDelete("Fib1_4");
ObjectDelete("Fib1_5");
ObjectDelete("Fib1");
ObjectDelete("Fib1p");
ObjectDelete("Fib2_0");
ObjectDelete("Fib2_1");
ObjectDelete("Fib2_2");
ObjectDelete("Fib2_3");
ObjectDelete("Fib2_4");
ObjectDelete("Fib2_5");
ObjectDelete("Fib2");
ObjectDelete("Fib2p");
ObjectDelete("Fib3_0");
ObjectDelete("Fib3_1");
ObjectDelete("Fib3_2");
ObjectDelete("Fib3_3");
ObjectDelete("Fib3_4");
ObjectDelete("Fib3_5");
ObjectDelete("Fib3");
ObjectDelete("Fib3p");
ObjectDelete("Fib4_0");
ObjectDelete("Fib4_1");
ObjectDelete("Fib4_2");
ObjectDelete("Fib4_3");
ObjectDelete("Fib4_4");
ObjectDelete("Fib4_5");
ObjectDelete("Fib4");
ObjectDelete("Fib4p");
ObjectDelete("Fib5_0");
ObjectDelete("Fib5_1");
ObjectDelete("Fib5_2");
ObjectDelete("Fib5_3");
ObjectDelete("Fib5_4");
ObjectDelete("Fib5_5");
ObjectDelete("Fib5");
ObjectDelete("Fib5p");
ObjectDelete("Fib6_0");
ObjectDelete("Fib6_1");
ObjectDelete("Fib6_2");
ObjectDelete("Fib6_3");
ObjectDelete("Fib6_4");
ObjectDelete("Fib6_5");
ObjectDelete("Fib6");
ObjectDelete("Fib6p");
ObjectDelete("Fib7_0");
ObjectDelete("Fib7_1");
ObjectDelete("Fib7_2");
ObjectDelete("Fib7_3");
ObjectDelete("Fib7_4");
ObjectDelete("Fib7_5");
ObjectDelete("Fib7");
ObjectDelete("Fib7p");
ObjectDelete("FibMulti1");
ObjectDelete("line98");
ObjectDelete("line97");
}
void objectBlank()
{
ObjectSet("Fib1_0",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib1_1",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib1_2",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib1_3",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib1_4",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib1_5",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib1",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib1p",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib2_0",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib2_1",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib2_2",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib2_3",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib2_4",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib2_5",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib2",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib2p",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib3_0",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib3_1",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib3_2",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib3_3",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib3_4",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib3_5",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib3",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib3p",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib4_0",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib4_1",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib4_2",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib4_3",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib4_4",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib4_5",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib4",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib4p",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib5_0",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib5_1",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib5_2",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib5_3",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib5_4",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib5_5",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib5",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib5p",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib6_0",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib6_1",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib6_2",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib6_3",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib6_4",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib6_5",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib6",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib6p",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib7_0",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib7_1",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib7_2",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib7_3",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib7_4",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib7_5",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib7",OBJPROP_COLOR,CLR_NONE);
ObjectSet("Fib7p",OBJPROP_COLOR,CLR_NONE);
ObjectSet("line98",OBJPROP_COLOR,CLR_NONE);
ObjectSet("line97",OBJPROP_COLOR,CLR_NONE);
}
void paintCol1(double value)
{
// 0.146 - 0.236 - 0.382 - 0.5 - 0.618 - 0.764 - 0.854 - 1.0 - 1.236 - 1.618 - 4.236
if (value <= v5) ObjectSet("Fib1_5",OBJPROP_COLOR,Maroon);
if (value > v5) ObjectSet("Fib1_5",OBJPROP_COLOR,Red);
if (value > v4) ObjectSet("Fib1_4",OBJPROP_COLOR,Orange);
if (value > v3) ObjectSet("Fib1_3",OBJPROP_COLOR,Gold);
if (value > v2) ObjectSet("Fib1_2",OBJPROP_COLOR,Yellow);
if (value > v1) ObjectSet("Fib1_1",OBJPROP_COLOR,YellowGreen);
if (value > v0) ObjectSet("Fib1_0",OBJPROP_COLOR,Lime);
ObjectSet("Fib1",OBJPROP_COLOR,SkyBlue);
ObjectSetText("Fib1p",DoubleToStr(value*100,0),8,"Arial Narrow",Silver);
GlobalVariableSet("Fib1",value);
}
void paintCol2(double value)
{
if (value <= v5) ObjectSet("Fib2_5",OBJPROP_COLOR,Maroon);
if (value > v5) ObjectSet("Fib2_5",OBJPROP_COLOR,Red);
if (value > v4) ObjectSet("Fib2_4",OBJPROP_COLOR,Orange);
if (value > v3) ObjectSet("Fib2_3",OBJPROP_COLOR,Gold);
if (value > v2) ObjectSet("Fib2_2",OBJPROP_COLOR,Yellow);
if (value > v1) ObjectSet("Fib2_1",OBJPROP_COLOR,YellowGreen);
if (value > v0) ObjectSet("Fib2_0",OBJPROP_COLOR,Lime);
ObjectSet("Fib2",OBJPROP_COLOR,SkyBlue);
ObjectSetText("Fib2p",DoubleToStr(value*100,0),8,"Arial Narrow",Silver);
GlobalVariableSet("Fib2",value);
}
void paintCol3(double value)
{
if (value <= v5) ObjectSet("Fib3_5",OBJPROP_COLOR,Maroon);
if (value > v5) ObjectSet("Fib3_5",OBJPROP_COLOR,Red);
if (value > v4) ObjectSet("Fib3_4",OBJPROP_COLOR,Orange);
if (value > v3) ObjectSet("Fib3_3",OBJPROP_COLOR,Gold);
if (value > v2) ObjectSet("Fib3_2",OBJPROP_COLOR,Yellow);
if (value > v1) ObjectSet("Fib3_1",OBJPROP_COLOR,YellowGreen);
if (value > v0) ObjectSet("Fib3_0",OBJPROP_COLOR,Lime);
ObjectSet("Fib3",OBJPROP_COLOR,SkyBlue);
ObjectSetText("Fib3p",DoubleToStr(value*100,0),8,"Arial Narrow",Silver);
GlobalVariableSet("Fib3",value);
}
void paintCol4(double value)
{
if (value <= v5) ObjectSet("Fib4_5",OBJPROP_COLOR,Maroon);
if (value > v5) ObjectSet("Fib4_5",OBJPROP_COLOR,Red);
if (value > v4) ObjectSet("Fib4_4",OBJPROP_COLOR,Orange);
if (value > v3) ObjectSet("Fib4_3",OBJPROP_COLOR,Gold);
if (value > v2) ObjectSet("Fib4_2",OBJPROP_COLOR,Yellow);
if (value > v1) ObjectSet("Fib4_1",OBJPROP_COLOR,YellowGreen);
if (value > v0) ObjectSet("Fib4_0",OBJPROP_COLOR,Lime);
ObjectSet("Fib4",OBJPROP_COLOR,SkyBlue);
ObjectSetText("Fib4p",DoubleToStr(value*100,0),8,"Arial Narrow",Silver);
GlobalVariableSet("Fib4",value);
}
void paintCol5(double value)
{
if (value <= v5) ObjectSet("Fib5_5",OBJPROP_COLOR,Maroon);
if (value > v5) ObjectSet("Fib5_5",OBJPROP_COLOR,Red);
if (value > v4) ObjectSet("Fib5_4",OBJPROP_COLOR,Orange);
if (value > v3) ObjectSet("Fib5_3",OBJPROP_COLOR,Gold);
if (value > v2) ObjectSet("Fib5_2",OBJPROP_COLOR,Yellow);
if (value > v1) ObjectSet("Fib5_1",OBJPROP_COLOR,YellowGreen);
if (value > v0) ObjectSet("Fib5_0",OBJPROP_COLOR,Lime);
ObjectSet("Fib5",OBJPROP_COLOR,SkyBlue);
ObjectSetText("Fib5p",DoubleToStr(value*100,0),8,"Arial Narrow",Silver);
GlobalVariableSet("Fib5",value);
}
void paintCol6(double value)
{
if (value <= v5) ObjectSet("Fib6_5",OBJPROP_COLOR,Maroon);
if (value > v5) ObjectSet("Fib6_5",OBJPROP_COLOR,Red);
if (value > v4) ObjectSet("Fib6_4",OBJPROP_COLOR,Orange);
if (value > v3) ObjectSet("Fib6_3",OBJPROP_COLOR,Gold);
if (value > v2) ObjectSet("Fib6_2",OBJPROP_COLOR,Yellow);
if (value > v1) ObjectSet("Fib6_1",OBJPROP_COLOR,YellowGreen);
if (value > v0) ObjectSet("Fib6_0",OBJPROP_COLOR,Lime);
ObjectSet("Fib6",OBJPROP_COLOR,SkyBlue);
ObjectSetText("Fib6p",DoubleToStr(value*100,0),8,"Arial Narrow",Silver);
GlobalVariableSet("Fib6",value);
}
void paintCol7(double value)
{
if (value <= v5) ObjectSet("Fib7_5",OBJPROP_COLOR,Maroon);
if (value > v5) ObjectSet("Fib7_5",OBJPROP_COLOR,Red);
if (value > v4) ObjectSet("Fib7_4",OBJPROP_COLOR,Orange);
if (value > v3) ObjectSet("Fib7_3",OBJPROP_COLOR,Gold);
if (value > v2) ObjectSet("Fib7_2",OBJPROP_COLOR,Yellow);
if (value > v1) ObjectSet("Fib7_1",OBJPROP_COLOR,YellowGreen);
if (value > v0) ObjectSet("Fib7_0",OBJPROP_COLOR,Lime);
ObjectSet("Fib7",OBJPROP_COLOR,SkyBlue);
ObjectSetText("Fib7p",DoubleToStr(value*100,0),8,"Arial Narrow",Silver);
GlobalVariableSet("Fib7",value);
}
void paintLine()
{
ObjectSet("line98",OBJPROP_COLOR,DimGray);
ObjectSet("line97",OBJPROP_COLOR,DimGray);
//----
return(0);
}
//+------------------------------------------------------------------+
Comments