Do ever have those days when you feel like you have an unbalanced left parenthesis? Kinda like that feeling you get when you eat too much Thai food and drink too much Singh Ha...Anyway, looking for quick help. This is a beginning attempt here for this indicator. All it does, for now, is draw an arrow on the price bars where the RSI > 75 or < 25. I've got one error in the compiling, the unbalanced left parensthesisthehhsis. Can someone take a look perhaps????
//+------------------------------------------------------------------+
//| RSIValuePlotl.mq4 |
//| Copyright 2006, ???) |
//| http://www.-----------.com |
//+------------------------------------------------------------------+
/*
+------------------------------------------------------------------+
| Arrows indicate where RSI input values are |
+------------------------------------------------------------------+
*/
#property copyright "Copyright 2006, ???"
#property link "http://www.-----------.com"
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Lime
#property indicator_color2 Red
double rsiup[];
double rsidown[];
extern int rsihi = 74.99; //rsi >= 75
extern int rsilo = 25.01; //rsi <= 25
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0, DRAW_ARROW, EMPTY);
SetIndexArrow(0, 233);
SetIndexBuffer(0, rsiup);
SetIndexStyle(1, DRAW_ARROW, EMPTY);
SetIndexArrow(1, 234);
SetIndexBuffer(1, rsidown);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int limit, i, counter;
double Range, AvgRange;
int counted_bars = IndicatorCounted();
//---- check for possible errors
if(counted_bars<0) return(-1);
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(i = 0; i <= limit; i++)
{
counter = i;
Range=0:
AvgRange=0:
for(counter=i ;counter <+i+9;counter++)
{
AvgRange=AvgRange+MathAbs(High[counter] - Low[counter]);
}
Range=AvgRange/10;
if (iRSI(NULL,0,14,PRICE_CLOSE) < rsilo)
{
rsiup[i]=Low[i] - Range * 0.6;
}
else if (iRSI(NULL,0,14,PRICE_CLOSE > rsihi)
{
rsidown[i]=High[i] + Range * 0.6;
}
}
return(0);
}
Not even sure if it works yet......
//+------------------------------------------------------------------+
//| RSIValuePlotl.mq4 |
//| Copyright 2006, ???) |
//| http://www.-----------.com |
//+------------------------------------------------------------------+
/*
+------------------------------------------------------------------+
| Arrows indicate where RSI input values are |
+------------------------------------------------------------------+
*/
#property copyright "Copyright 2006, ???"
#property link "http://www.-----------.com"
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Lime
#property indicator_color2 Red
double rsiup[];
double rsidown[];
extern int rsihi = 74.99; //rsi >= 75
extern int rsilo = 25.01; //rsi <= 25
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0, DRAW_ARROW, EMPTY);
SetIndexArrow(0, 233);
SetIndexBuffer(0, rsiup);
SetIndexStyle(1, DRAW_ARROW, EMPTY);
SetIndexArrow(1, 234);
SetIndexBuffer(1, rsidown);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int limit, i, counter;
double Range, AvgRange;
int counted_bars = IndicatorCounted();
//---- check for possible errors
if(counted_bars<0) return(-1);
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(i = 0; i <= limit; i++)
{
counter = i;
Range=0:
AvgRange=0:
for(counter=i ;counter <+i+9;counter++)
{
AvgRange=AvgRange+MathAbs(High[counter] - Low[counter]);
}
Range=AvgRange/10;
if (iRSI(NULL,0,14,PRICE_CLOSE) < rsilo)
{
rsiup[i]=Low[i] - Range * 0.6;
}
else if (iRSI(NULL,0,14,PRICE_CLOSE > rsihi)
{
rsidown[i]=High[i] + Range * 0.6;
}
}
return(0);
}
Not even sure if it works yet......