!





//+------------------------------------------------------------------+
//|                                                  Fabularasa.mq4 |
//|                                                      Fabularasa |
//|                                                                  |
//+------------------------------------------------------------------+

#property copyright "Fabularasa"
#property copyright "X"
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_levelcolor DarkSlateGray
#property indicator_color1 Blue
#property indicator_color2 Gold
#property indicator_levelcolor DarkSlateGray

bool Side = True;
extern int Y = 5;
extern int X = 5;
extern color BarLabel_color = DarkGreen;
extern int barsPerTimeFrame =1000;


double rsi[], ema[],rsiTF1[],
      emaTF1,
      rsiTF5[],
      emaTF5,
      rsiTF15[],
      emaTF15,
      rsiTF30[],
      emaTF30,
      rsiTF1H[],
      emaTF1H,
      rsiTF4H[],
      emaTF4H;

int init()
{

if ( barsPerTimeFrame > 3000 ) barsPerTimeFrame = 3000;

  IndicatorBuffers(8);

  SetIndexStyle (0, DRAW_LINE,Blue);
  SetIndexStyle (1, DRAW_LINE,Green);
  SetIndexBuffer(0, rsi);
  SetIndexBuffer(1, ema);
  SetIndexBuffer(2,rsiTF1);
  SetIndexBuffer(3,rsiTF5);
  SetIndexBuffer(4,rsiTF15);
  SetIndexBuffer(5,rsiTF30);
  SetIndexBuffer(6,rsiTF1H); 
  SetIndexBuffer(7,rsiTF4H); 

    
  return(0);
}


int deinit()
{
ObjectDelete("NumberRsi");
ObjectDelete("RSI1");
ObjectDelete("RSI5");
ObjectDelete("RSI15");
ObjectDelete("RSI30");
ObjectDelete("RSI1H");
ObjectDelete("RSI4H");

return(0);
}





int start()
{

int limit = Bars;


for(int b=0; b<barsPerTimeFrame; b++)
rsi[b] = iRSI(Symbol(),0,34,PRICE_CLOSE,b);

for(int c=0; c<barsPerTimeFrame; c++)
ema[c] = iMAOnArray(rsi,0,8,0,MODE_EMA,c);

for(int a1=0; a1<barsPerTimeFrame; a1++)
  { 
      rsiTF1[a1] = iRSI(Symbol(),1,14,PRICE_CLOSE,a1);
      rsiTF5[a1] = iRSI(Symbol(),5,14,PRICE_CLOSE,a1);
      rsiTF15[a1] = iRSI(Symbol(),15,14,PRICE_CLOSE,a1);
      rsiTF30[a1] = iRSI(Symbol(),30,14,PRICE_CLOSE,a1);
      rsiTF1H[a1] = iRSI(Symbol(),60,14,PRICE_CLOSE,a1);
      rsiTF4H[a1] = iRSI(Symbol(),240,14,PRICE_CLOSE,a1);
      //rsi[a1] = iRSI(Symbol(),0,14,PRICE_CLOSE,a1);
  }


emaTF1 = iMAOnArray(rsiTF1,0,8,0,MODE_EMA,0);
emaTF5 = iMAOnArray(rsiTF5,0,8,0,MODE_EMA,0);
emaTF15= iMAOnArray(rsiTF15,0,8,0,MODE_EMA,0);
emaTF30= iMAOnArray(rsiTF30,0,8,0,MODE_EMA,0);
emaTF1H= iMAOnArray(rsiTF1H,0,8,0,MODE_EMA,0);
emaTF4H= iMAOnArray(rsiTF4H,0,8,0,MODE_EMA,0);

string EMA1 = emaTF1;
string EMA5 = emaTF5;
string EMA15 = emaTF15;
string EMA30 = emaTF30;
string EMA1H = emaTF1H;
string EMA4H = emaTF4H;

Write("NumberRsi", Side, X+12, Y, "M1     M5     M15     M30     H1     H4", 6, "Tahoma Narrow", BarLabel_color);
Write("RSI1",  Side, X+5 , Y+10, StringSubstr(EMA1,0,5),  6, "Tahoma Narrow", White);
Write("RSI5",  Side, X+29,  Y+10, StringSubstr(EMA5,0,5),  6, "Tahoma Narrow", White);
Write("RSI15", Side, X+51,  Y+10, StringSubstr(EMA15,0,5), 6, "Tahoma Narrow", White);
Write("RSI30", Side, X+74,  Y+10, StringSubstr(EMA30,0,5), 6, "Tahoma Narrow", White);
Write("RSI1H", Side, X+97,  Y+10, StringSubstr(EMA1H,0,5), 6, "Tahoma Narrow", White);
Write("RSI4H", Side, X+120,  Y+10, StringSubstr(EMA4H,0,5), 6, "Tahoma Narrow", White);



return(0);
}
//+------------------------------------------------------------------+

void Write(string LBL, double Side, int X, int Y, string text, int fontsize, string fontname, color Tcolor)
{


  ObjectCreate(LBL, OBJ_LABEL,WindowFind("!"), 0, 0);
  ObjectSetText(LBL,text, fontsize, fontname, Tcolor);
  ObjectSet(LBL, OBJPROP_CORNER, Side);
  ObjectSet(LBL, OBJPROP_XDISTANCE, X);
  ObjectSet(LBL, OBJPROP_YDISTANCE, Y);
 
 
} 



Sample





Analysis



Market Information Used:



Indicator Curves created:



Indicators Used:

Relative strength index
Moving average indicator


Custom Indicators Used:

Order Management characteristics:

Other Features: