//+------------------------------------------------------------------+ //| Vol.mq4 | //| | //| | //+------------------------------------------------------------------+ #property copyright "" #property link "" #property version "1.00" #property strict #property indicator_separate_window #property indicator_color1 DarkBlue #property indicator_width1 2 extern int Number_Of_Bars=100; //=============================================+ //=============================================+ double Buff1[]; int OnInit() { SetIndexBuffer(0,Buff1); SetIndexStyle(0,DRAW_HISTOGRAM); return(INIT_SUCCEEDED); } //=============================================+ //=============================================+ datetime timee; int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { if(timee!=iTime(Symbol(),PERIOD_CURRENT,0)) { Volume_Bars_Creator(); } timee=iTime(Symbol(),PERIOD_CURRENT,0); return(rates_total); } //=============================================+ //=============================================+ void Volume_Bars_Creator() { int shift=2; for(int i=1;i<Number_Of_Bars;i++) { Buff1[shift]=Volume[i]; shift=shift+2; } }
int shift=2; for(int i=1;i<Number_Of_Bars;i++) { Buff1[shift]=0; shift=shift+2; }
//+------------------------------------------------------------------+ //| Vol.mq4 | //| | //| | //+------------------------------------------------------------------+ #property copyright "" #property link "" #property version "1.00" #property strict #property indicator_separate_window #property indicator_color1 DarkBlue #property indicator_width1 2 extern int Number_Of_Bars=100; //=============================================+ //=============================================+ double Buff1[]; int OnInit() { SetIndexBuffer(0,Buff1); SetIndexStyle(0,DRAW_HISTOGRAM); return(INIT_SUCCEEDED); } //=============================================+ //=============================================+ datetime timee; int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { if(timee!=iTime(Symbol(),PERIOD_CURRENT,0)) { int shift=2; for(int i=1;i<Number_Of_Bars;i++) { Buff1[shift]=0; shift=shift+2; } Volume_Bars_Creator(); } timee=iTime(Symbol(),PERIOD_CURRENT,0); return(rates_total); } //=============================================+ //=============================================+ void Volume_Bars_Creator() { int shift=2; for(int i=1;i<Number_Of_Bars;i++) { Buff1[shift]=Volume[i]; shift=shift+2; } }
//+------------------------------------------------------------------+ //| Vol.mq4 | //| | //| | //+------------------------------------------------------------------+ #property copyright "" #property link "" #property version "1.00" #property strict #property indicator_separate_window #property indicator_color1 DarkBlue #property indicator_width1 2 extern int Number_Of_Bars=100; //=============================================+ //=============================================+ double Buff1[]; int OnInit() { SetIndexBuffer(0,Buff1); SetIndexStyle(0,DRAW_HISTOGRAM); return(INIT_SUCCEEDED); } //=============================================+ //=============================================+ datetime timee; int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { if(timee!=iTime(Symbol(),PERIOD_CURRENT,0)) { Volume_Bars_Creator(); } timee=iTime(Symbol(),PERIOD_CURRENT,0); return(rates_total); } //=============================================+ //=============================================+ void Volume_Bars_Creator() { int shift=0; for(int i=1;i<Number_Of_Bars;i++) { Buff1[shift]=Volume[i]; shift=shift+2; } }
//+------------------------------------------------------------------+ //| Vol.mq4 | //| | //| | //+------------------------------------------------------------------+ #property copyright "" #property link "" #property version "1.00" #property strict #property indicator_separate_window #property indicator_color1 DarkBlue #property indicator_width1 2 extern int Number_Of_Bars=100; //=============================================+ //=============================================+ double Buff1[]; int OnInit() { SetIndexBuffer(0,Buff1); SetIndexStyle(0,DRAW_HISTOGRAM); return(INIT_SUCCEEDED); } //=============================================+ //=============================================+ datetime timee; int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { if(timee!=iTime(Symbol(),PERIOD_CURRENT,0)) { Volume_Bars_Creator(); } timee=iTime(Symbol(),PERIOD_CURRENT,0); return(rates_total); } //=============================================+ //=============================================+ void Volume_Bars_Creator() { int shift=0; for(int i=1;i<Number_Of_Bars;i++) { Buff1[shift]=Volume[i]; shift=shift+2; } }
المواضيع المتشابهه | ||||
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
طلب عمل مؤشر بسيط للفيبوناتشي أرجو المساعدة | رامينة | منتدى المؤشرات و الاكسبرتات | 2 | 29 - 07 - 2017 09:38 AM |
اكسبيرت رائع محتاج تعديل بسيط أرجو المساعدة | فوركس للعضم | منتدى المؤشرات و الاكسبرتات | 8 | 30 - 05 - 2012 09:29 PM |