Download MetaTrader 5

Indicators: XIT_FIBS.mq4 - Automatically plot Fibonacci retracement lines with price on visible chart.

To add comments, please log in or register
MetaQuotes Software Corp.
Moderator
183680
MetaQuotes Software Corp.  

XIT_FIBS.mq4 - Automatically plot Fibonacci retracement lines with price on visible chart. :

Simple indicator that automatically plots Fibonacci lines on current chart. Lines have retracement values and price.

Author: Jeff West

toddanderson
475
toddanderson  
Could you make your indicator work on indicators, like a RSI,CCI drawing fibs across a RSI indicator on a separate window ?
Jeff West
3
Jeff West  
toddanderson:
Could you make your indicator work on indicators, like a RSI,CCI drawing fibs across a RSI indicator on a separate window ?
I think that can be done. I will play around with it and see what i can do. I will let you know what i come up with..
toddanderson
475
toddanderson  
jeff10278:
toddanderson:
Could you make your indicator work on indicators, like a RSI,CCI drawing fibs across a RSI indicator on a separate window ?
I think that can be done. I will play around with it and see what i can do. I will let you know what i come up with..


thanks for the indicator it works well
magno barco
45
magno barco  
thanks
MQL4 Comments
16319
MQL4 Comments  

Hello jeff10278

It is an interesting indicator. Can you please work on extension too? Thank you.

MQL4 Comments
16319
MQL4 Comments  
Thank you for such a terrific indicator. I mostly use FIBS for exit targets with great success. Thank you.
cisco press
57
cisco press  
cisco press
57
cisco press  

hi

shorter. :)

tnx for code

//+------------------------------------------------------------------+
//|                                                    XIT_FIBS.mq4  |
//|                         Copyright © 2011, Jeff West - Forex-XIT  |
//|                                        http://www.forex-xit.com  |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2011, Jeff West - Forex-XIT"
#property link      "http://www.forex-xit.com"
 
#property indicator_chart_window
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
ObjectDelete("XIT_FIBO");
Comment("");
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
ObjectDelete("XIT_FIBO");
Comment("");
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
  //----
 
     int fibHigh = iHighest(Symbol(),Period(),MODE_HIGH,WindowFirstVisibleBar()-1,1);
     int fibLow  = iLowest(Symbol(),Period(),MODE_LOW,WindowFirstVisibleBar()-1,1);
     
     datetime highTime = Time[fibHigh];
     datetime lowTime  = Time[fibLow];
     
      if(fibHigh>fibLow){
      WindowRedraw();
      ObjectCreate("XIT_FIBO",OBJ_FIBO,0,highTime,High[fibHigh],lowTime,Low[fibLow]);
      color levelColor = Red;
      }
      else{
      WindowRedraw();
      ObjectCreate("XIT_FIBO",OBJ_FIBO,0,lowTime,Low[fibLow],highTime,High[fibHigh]);
      levelColor = Green;
      }
      
      double fiboPrice1=ObjectGet("XIT_FIBO",OBJPROP_PRICE1);
      double fiboPrice2=ObjectGet("XIT_FIBO",OBJPROP_PRICE2);
      
      /*
      double fiboPriceDiff = fiboPrice2-fiboPrice1;
      string fiboValue0 = DoubleToStr(fiboPrice2-fiboPriceDiff*0.0,Digits);
      string fiboValue23 = DoubleToStr(fiboPrice2-fiboPriceDiff*0.236,Digits);
      string fiboValue38 = DoubleToStr(fiboPrice2-fiboPriceDiff*0.382,Digits);
      string fiboValue50 = DoubleToStr(fiboPrice2-fiboPriceDiff*0.50,Digits);
      string fiboValue61 = DoubleToStr(fiboPrice2-fiboPriceDiff*0.618,Digits);
      string fiboValue100 = DoubleToStr(fiboPrice2-fiboPriceDiff*1.0,Digits);
    */
     ObjectSet("XIT_FIBO",OBJPROP_FIBOLEVELS,6);
     ObjectSet("XIT_FIBO",OBJPROP_FIRSTLEVEL+0,0.0);
     ObjectSet("XIT_FIBO",OBJPROP_FIRSTLEVEL+1,0.236);
     ObjectSet("XIT_FIBO",OBJPROP_FIRSTLEVEL+2,0.382);
     ObjectSet("XIT_FIBO",OBJPROP_FIRSTLEVEL+3,0.50);
     ObjectSet("XIT_FIBO",OBJPROP_FIRSTLEVEL+4,0.618);
     ObjectSet("XIT_FIBO",OBJPROP_FIRSTLEVEL+5,1.0);
     
     
     ObjectSet("XIT_FIBO",OBJPROP_LEVELCOLOR,levelColor);
     ObjectSet("XIT_FIBO",OBJPROP_LEVELWIDTH,1);
     ObjectSet("XIT_FIBO",OBJPROP_LEVELSTYLE,STYLE_DASHDOTDOT);
     ObjectSetFiboDescription( "XIT_FIBO", 0,"%$  --> 0.0%"); 
     ObjectSetFiboDescription( "XIT_FIBO", 1,"%$ --> 23.6%"); 
     ObjectSetFiboDescription( "XIT_FIBO", 2,"%$ --> 38.2%"); 
     ObjectSetFiboDescription( "XIT_FIBO", 3,"%$ --> 50.0%");
     ObjectSetFiboDescription( "XIT_FIBO", 4,"%$ --> 61.8%");
     ObjectSetFiboDescription( "XIT_FIBO", 5,"%$ --> 100.0%");
   
   
 
//----
   return(0);
  }
//+------------------------------------------------------------------+ 
moshelevii levi
15
moshelevii levi  
cisco:

hi

shorter. :)

tnx for code

//+------------------------------------------------------------------+
//|                                                    XIT_FIBS.mq4  |
//|                         Copyright © 2011, Jeff West - Forex-XIT  |
//|                                        http://www.forex-xit.com  |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2011, Jeff West - Forex-XIT"
#property link      "http://www.forex-xit.com"
 
#property indicator_chart_window
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
ObjectDelete("XIT_FIBO");
Comment("");
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
ObjectDelete("XIT_FIBO");
Comment("");
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
  //----
 
     int fibHigh = iHighest(Symbol(),Period(),MODE_HIGH,WindowFirstVisibleBar()-1,1);
     int fibLow  = iLowest(Symbol(),Period(),MODE_LOW,WindowFirstVisibleBar()-1,1);
     
     datetime highTime = Time[fibHigh];
     datetime lowTime  = Time[fibLow];
     
      if(fibHigh>fibLow){
      WindowRedraw();
      ObjectCreate("XIT_FIBO",OBJ_FIBO,0,highTime,High[fibHigh],lowTime,Low[fibLow]);
      color levelColor = Red;
      }
      else{
      WindowRedraw();
      ObjectCreate("XIT_FIBO",OBJ_FIBO,0,lowTime,Low[fibLow],highTime,High[fibHigh]);
      levelColor = Green;
      }
      
      double fiboPrice1=ObjectGet("XIT_FIBO",OBJPROP_PRICE1);
      double fiboPrice2=ObjectGet("XIT_FIBO",OBJPROP_PRICE2);
      
      /*
      double fiboPriceDiff = fiboPrice2-fiboPrice1;
      string fiboValue0 = DoubleToStr(fiboPrice2-fiboPriceDiff*0.0,Digits);
      string fiboValue23 = DoubleToStr(fiboPrice2-fiboPriceDiff*0.236,Digits);
      string fiboValue38 = DoubleToStr(fiboPrice2-fiboPriceDiff*0.382,Digits);
      string fiboValue50 = DoubleToStr(fiboPrice2-fiboPriceDiff*0.50,Digits);
      string fiboValue61 = DoubleToStr(fiboPrice2-fiboPriceDiff*0.618,Digits);
      string fiboValue100 = DoubleToStr(fiboPrice2-fiboPriceDiff*1.0,Digits);
    */
     ObjectSet("XIT_FIBO",OBJPROP_FIBOLEVELS,6);
     ObjectSet("XIT_FIBO",OBJPROP_FIRSTLEVEL+0,0.0);
     ObjectSet("XIT_FIBO",OBJPROP_FIRSTLEVEL+1,0.236);
     ObjectSet("XIT_FIBO",OBJPROP_FIRSTLEVEL+2,0.382);
     ObjectSet("XIT_FIBO",OBJPROP_FIRSTLEVEL+3,0.50);
     ObjectSet("XIT_FIBO",OBJPROP_FIRSTLEVEL+4,0.618);
     ObjectSet("XIT_FIBO",OBJPROP_FIRSTLEVEL+5,1.0);
     
     
     ObjectSet("XIT_FIBO",OBJPROP_LEVELCOLOR,levelColor);
     ObjectSet("XIT_FIBO",OBJPROP_LEVELWIDTH,1);
     ObjectSet("XIT_FIBO",OBJPROP_LEVELSTYLE,STYLE_DASHDOTDOT);
     ObjectSetFiboDescription( "XIT_FIBO", 0,"%$  --> 0.0%"); 
     ObjectSetFiboDescription( "XIT_FIBO", 1,"%$ --> 23.6%"); 
     ObjectSetFiboDescription( "XIT_FIBO", 2,"%$ --> 38.2%"); 
     ObjectSetFiboDescription( "XIT_FIBO", 3,"%$ --> 50.0%");
     ObjectSetFiboDescription( "XIT_FIBO", 4,"%$ --> 61.8%");
     ObjectSetFiboDescription( "XIT_FIBO", 5,"%$ --> 100.0%");
   
   
 
//----
   return(0);
  }
//+------------------------------------------------------------------+ 
Is any one can write EA for that Auto Fib
mikecool
10
mikecool  

This is a nice and good indicator, i love it. but I will like you to add a trend lines to it, like quick fibo. It will make it more better and more powerful.

See the pics below to see what i mean

12
To add comments, please log in or register