here the code....a friend of mine helped me:
Intraday Normalized
//+------------------------------------------------------------------+
//| Accumulation.mq4 |
//| Copyright © 2005, MetaQuotes Software Corp. |
//|
Forex Trading Software: Forex Trading Platform MetaTrader 4 |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2005, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net/"
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 LightSeaGreen
//---- buffers
double ExtMapBuffer1[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
IndicatorShortName("Intraday Normalizzato");
//---- indicators
SetIndexStyle(0,DRAW_HISTOGRAM);
SetIndexBuffer(0,ExtMapBuffer1);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Intraday Intensity |
//+------------------------------------------------------------------+
int start()
{
int i,counted_bars=IndicatorCounted();
//----
i=Bars-counted_bars-1;
while(i>=0)
{
double high =High[i];
double low =Low[i];
double open =Open[i];
double close=Close[i];
double std=0;
double SommaVolumi=0;
for (int k=i;k<=i+20;k++)
{
high =High[k];
low =Low[k];
open =Open[k];
close=Close[k];
double calcolo=0;
if((high-low)!=0)
calcolo=((2*close-high-low)/(high-low))*Volume[k];
SommaVolumi=SommaVolumi+Volume[k];
std=std+calcolo;
}
ExtMapBuffer1[i]=(std/SommaVolumi)*100;
i--;
}
//----
return(0);
}
//+------------------------------------------------------------------+
Intraday standard
//+------------------------------------------------------------------+
//| Accumulation.mq4 |
//| Copyright © 2005, MetaQuotes Software Corp. |
//|
Forex Trading Software: Forex Trading Platform MetaTrader 4 |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2005, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net/"
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Black
//---- buffers
double ExtMapBuffer1[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
IndicatorShortName("Intraday Standard");
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ExtMapBuffer1);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Intraday Intensity |
//+------------------------------------------------------------------+
int start()
{
int i,counted_bars=IndicatorCounted();
//----
i=Bars-counted_bars-1;
while(i>=0)
{
double high =High[i];
double low =Low[i];
double open =Open[i];
double close=Close[i];
double std=0;
double SommaVolumi=0;
for (int k=i;k<=i+20;k++)
{
high =High[k];
low =Low[k];
open =Open[k];
close=Close[k];
double calcolo=0;
if((high-low)!=0)
calcolo=((2*close-high-low)/(high-low))*Volume[k];
SommaVolumi=SommaVolumi+Volume[k];
std=std+calcolo;
}
ExtMapBuffer1[i]=std;
i--;
}
//----
return(0);
}
//+----------------------------+