View Single Post
  #28 (permalink)  
Old 01-26-2006, 12:55 PM
schwager schwager is offline
Member
 
Join Date: Oct 2005
Location: Germany
Posts: 61
schwager is on a distinguished road
need help Rei

PHP Code:
//+------------------------------------------------------------------+
//|                                                          Rei.mq4 |
//|                                                 Copyright © 2005 |
//|                                                      freeware.de |
//+------------------------------------------------------------------+
#property copyright "Copyright "
#property link      "Freeware"

#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Red
double REIBuffer[];

int init()
  {
   
SetIndexStyle(0,DRAW_LINE);
   
SetIndexShift(0,0);
   
SetIndexDrawBegin(0,0);
   
SetIndexBuffer(0,REIBuffer);


//---- indicators
//----
   
return(0);
  }
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//---- TODO: add your code here
   
//----
   
return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start() {
   
int limit,SubValues,AbsDailyVal,Rei;
   
int counted_bars=IndicatorCounted(),x1=0,x2=0;
   
   
   if(
counted_bars<0) return(-1);
   if(
counted_bars>0counted_bars--;
   
   
limit=Bars-counted_bars;
   
   
double avg;

   for(
int x=0x<limitx++;); 
   {
     if(
High[2]<Close[7]&&High[2]<Close[8]&& High[x]<Low[5]&&High[x]<Low[6]) x1=1;
     
     if(
Low[2]>Close[7]&&Low[2]>Close[8]&&Low[x]>High[5]&&Low[x]>High[6x2=1;
     
     
SubValues=((x1*x2*(High[x]-High[2])+((x1*x2*(Low[x]-Low[2]));
     
AbsDailyVal=(High[x]-High[2])+(Low[x]-Low[2]);
     
Rei=SubValues[8]/AbsDailyVal[8];
     
REIBuffer[]=Rei;
 
   }
   return(
0);
  }
//+------------------------------------------------------------------+ 
codersguru or other specialists can you
please check it and find the error??

Thanks
Reply With Quote