/*
*********************************************************************
Akuma99 Atmosphere
Copyright � 2005 Akuma99
http://akuma99.blogspot.com
For help on this indicator, tutorials and information
visit http://akuma99.blogspot.com/
*********************************************************************
*/
#property link "http://akuma99.blogspot.com/"
#property copyright "� 2005 Akuma99 (http://akuma99.blogspot.com)"
#property indicator_chart_window
#property indicator_buffers 6
#property indicator_color1 OldLace
#property indicator_color2 OldLace
#property indicator_color3 LightYellow
#property indicator_color4 LightYellow
#property indicator_color5 MintCream
#property indicator_color6 MintCream
extern double offset = 0;
double asia1[];
double asia2[];
double europe1[];
double europe2[];
double us1[];
double us2[];
int init() {
IndicatorBuffers(6);
SetIndexStyle(0,DRAW_HISTOGRAM, 0, 5, indicator_color1);
SetIndexBuffer(0, asia1);
SetIndexLabel(0,"Asian session");
SetIndexStyle(1,DRAW_HISTOGRAM, 0, 5, indicator_color2);
SetIndexBuffer(1, asia2);
SetIndexLabel(1,"Asian session");
SetIndexStyle(2,DRAW_HISTOGRAM, 0, 5, indicator_color3);
SetIndexBuffer(2, europe1);
SetIndexLabel(2,"European session");
SetIndexStyle(3,DRAW_HISTOGRAM, 0, 5, indicator_color4);
SetIndexBuffer(3, europe2);
SetIndexLabel(3,"European session");
SetIndexStyle(4,DRAW_HISTOGRAM, 0, 5, indicator_color5);
SetIndexBuffer(4, us1);
SetIndexLabel(4,"US session");
SetIndexStyle(5,DRAW_HISTOGRAM, 0, 5, indicator_color6);
SetIndexBuffer(5, us2);
SetIndexLabel(5,"US session");
return(0);
}
int start() {
int counted_bars=IndicatorCounted();
int limit = Bars-counted_bars;
int i;
for (i=limit; i>=0; i--) {
if (TimeHour(Time[i]) >= 0+offset && TimeHour(Time[i]) <= 7+offset) {
asia1[i]=1000;
asia2[i]=0;
} else if (TimeHour(Time[i]) >= 8+offset && TimeHour(Time[i]) <= 15+offset) {
europe1[i]=1000;
europe2[i]=0;
} else if (TimeHour(Time[i]) >= 16+offset && TimeHour(Time[i]) <= 23+offset) {
us1[i]=1000;
us2[i]=0;
} else if (TimeHour(Time[i]) == 0) {
us1[i]=1000;
us2[i]=0;
} else {
asia1[i]=1000;
asia2[i]=0;
}
}
return(0);
}