HighLowExtractor





//+------------------------------------------------------------------+
//|                                             HighLowExtractor.mq4 |
//|                                                           ttitto |
//|Extracts the difference between high and low of a bar and 
// writes it a file                                                                  |
//+------------------------------------------------------------------+
#property copyright "ttitto"
#property link      ""

//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
  datetime PreviousBarTime;
  int HighLowDifference;
  
int handle;
HighLowDifference=(High[1]-Low[1])*MathPow(10,Digits);
PreviousBarTime=Time[1];
  
  handle=FileOpen(Symbol()+"_HighLowExtractor_"+Period()+"M.csv", FILE_CSV|FILE_READ|FILE_WRITE, ';');
  if(handle>0)
    {
     FileSeek(handle,0,SEEK_END);
     FileWrite( handle,TimeToStr(PreviousBarTime), Close[1], Open[1], High[1], Low[1], HighLowDifference);
     FileClose(handle);
    }
  

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



Sample





Analysis



Market Information Used:

Series array that contains the highest prices of each bar
Series array that contains the lowest prices of each bar
Series array that contains open time of each bar
Series array that contains close prices for each bar
Series array that contains open prices of each bar


Indicator Curves created:


Indicators Used:



Custom Indicators Used:

Order Management characteristics:

Other Features:

Uses files from the file system

It writes information to file