

//+------------------------------------------------------------------+ //| simple lines.mq4 | //| Copyright 2023, MetaQuotes Software Corp. | //| [عذراً, فقط الأعضاء يمكنهم مشاهدة الروابط ] | //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ #property copyright "H.L Lines Ind" #property link "[عذراً, فقط الأعضاء يمكنهم مشاهدة الروابط ]" #property description "H.L Lines" #property strict #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Red // Low / Minor #property indicator_color2 Blue // High / Major input ENUM_TIMEFRAMES frame=PERIOD_H4; //--- input parameters input int InpMinor=50; // Low input int InpMajor=50; // High //--- buffers double ExtMinorBuffer[]; double ExtMajorBuffer[]; //--- int ExtBegin; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ void OnInit(void) { IndicatorDigits(Digits); //--- SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,ExtMinorBuffer); SetIndexDrawBegin(0,InpMinor-1); SetIndexLabel(0,"Minor"); //--- SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(1,ExtMajorBuffer); SetIndexDrawBegin(1,InpMajor-1); SetIndexLabel(1,"Major"); //--- ExtBegin=InpMajor; if(ExtBegin<InpMinor) ExtBegin=InpMinor; //--- initialization done } //+------------------------------------------------------------------+ //| H.L Indictor Lines | //+------------------------------------------------------------------+ 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[]) { int i,k,pos; double high_value,low_value; //--- if(rates_total<=InpMinor || rates_total<=InpMajor) return(0); //--- counting from 0 to rates_total ArraySetAsSeries(ExtMinorBuffer,false); ArraySetAsSeries(ExtMajorBuffer,false); ArraySetAsSeries(open,false); ArraySetAsSeries(high,false); ArraySetAsSeries(low,false); ArraySetAsSeries(close,false); //--- initial zero if(prev_calculated<1) { for(i=0; i<InpMinor; i++) ExtMinorBuffer[i]=0.0; for(i=0; i<InpMajor; i++) ExtMajorBuffer[i]=0.0; for(i=0; i<ExtBegin; i++) } //--- Minor pos=InpMinor-1; if(prev_calculated>InpMinor) pos=prev_calculated-1; for(i=pos; i<rates_total; i++) { high_value=iHigh(NULL,frame,i); low_value=iLow(NULL,frame,i); k=i+1-InpMinor; while(k<=i) { if(high_value<iHigh(NULL,frame,k)) high_value=iHigh(NULL,frame,k); if(low_value>iLow(NULL,frame,k)) low_value=iLow(NULL,frame,k); k++; } ExtMinorBuffer[i]=high_value-((high_value-low_value)*0.1); } //--- Major pos=InpMajor-1; if(prev_calculated>InpMajor) pos=prev_calculated-1; for(i=pos; i<rates_total; i++) { high_value=iHigh(NULL,frame,i); low_value=iLow(NULL,frame,i); k=i+1-InpMajor; while(k<=i) { if(high_value<iHigh(NULL,frame,k)) high_value=iHigh(NULL,frame,k); if(low_value>iLow(NULL,frame,k)) low_value=iLow(NULL,frame,k); k++; } ExtMajorBuffer[i]=low_value-((high_value-low_value)*0.1); } //--- return(rates_total); } //+------------------------------------------------------------------+

//+------------------------------------------------------------------+ //| simple lines.mq4 | //| Copyright 2023, MetaQuotes Software Corp. | //| [عذراً, فقط الأعضاء يمكنهم مشاهدة الروابط ] | //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ #property copyright "H.L Lines Ind" #property link "[عذراً, فقط الأعضاء يمكنهم مشاهدة الروابط ]" #property description "H.L Lines" #property strict #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Red // Low / Minor #property indicator_color2 Blue // High / Major input ENUM_TIMEFRAMES frame=PERIOD_H4; //--- input parameters input int InpMinor=50; // Low input int InpMajor=50; // High //--- buffers double ExtMinorBuffer[]; double ExtMajorBuffer[]; //--- int ExtBegin; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ void OnInit(void) { IndicatorDigits(Digits); //--- SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,ExtMinorBuffer); SetIndexDrawBegin(0,InpMinor-1); SetIndexLabel(0,"Minor"); //--- SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(1,ExtMajorBuffer); SetIndexDrawBegin(1,InpMajor-1); SetIndexLabel(1,"Major"); //--- ExtBegin=InpMajor; if(ExtBegin<InpMinor) ExtBegin=InpMinor; //--- initialization done } //+------------------------------------------------------------------+ //| H.L Indictor Lines | //+------------------------------------------------------------------+ 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[]) { int i,k,pos; double high_value,low_value; per=int(double(InpMajor)/double(Period())*frame); if(rates_total<=InpMinor || rates_total<=InpMajor) return(0); //--- counting from 0 to rates_total ArraySetAsSeries(ExtMinorBuffer,false); ArraySetAsSeries(ExtMajorBuffer,false); ArraySetAsSeries(open,false); ArraySetAsSeries(high,false); ArraySetAsSeries(low,false); ArraySetAsSeries(close,false); //--- initial zero if(prev_calculated<1) { for(i=0; i<per; i++) ExtMinorBuffer[i]=0.0; for(i=0; i<per; i++) ExtMajorBuffer[i]=0.0; for(i=0; i<ExtBegin; i++) } //--- Minor pos=per-1; if(prev_calculated>per) pos=prev_calculated-1; for(i=pos; i<rates_total; i++) { high_value=high[i]; low_value=low[i]; k=i+1-per; while(k<=i) { if(high_value<high[k]) high_value=high[k]; if(low_value>low[k]) low_value=low[k]; k++; } ExtMinorBuffer[i]=high_value-((high_value-low_value)*0.1); } //--- Major pos=per-1; if(prev_calculated>per) pos=prev_calculated-1; for(i=pos; i<rates_total; i++) { high_value=high[i]; low_value=low[i]; k=i+1-per; while(k<=i) { if(high_value<high[k]) high_value=high[k]; if(low_value>low[k]) low_value=low[k]; k++; } ExtMajorBuffer[i]=low_value-((high_value-low_value)*0.1); } //--- return(rates_total); } //+------------------------------------------------------------------+ int per;


//+------------------------------------------------------------------+ //| simple lines.mq4 | //| Copyright 2023, MetaQuotes Software Corp. | //| [عذراً, فقط الأعضاء يمكنهم مشاهدة الروابط ] | //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ #property copyright "H.L Lines Ind" #property link "[عذراً, فقط الأعضاء يمكنهم مشاهدة الروابط ]" #property description "H.L Lines" #property strict #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Red // Low / Minor #property indicator_color2 Blue // High / Major input ENUM_TIMEFRAMES frame=PERIOD_H4; //--- input parameters input int InpMinor=50; // Low input int InpMajor=50; // High //--- buffers double ExtMinorBuffer[]; double ExtMajorBuffer[]; //--- int ExtBegin; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ void OnInit(void) { IndicatorDigits(Digits); //--- SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,ExtMinorBuffer); SetIndexDrawBegin(0,InpMinor-1); SetIndexLabel(0,"Minor"); //--- SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(1,ExtMajorBuffer); SetIndexDrawBegin(1,InpMajor-1); SetIndexLabel(1,"Major"); //--- ExtBegin=InpMajor; if(ExtBegin<InpMinor) ExtBegin=InpMinor; //--- initialization done } //+------------------------------------------------------------------+ //| H.L Indictor Lines | //+------------------------------------------------------------------+ 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[]) { int i,k,pos; double high_value,low_value; per=int(double(InpMajor)/double(Period())*frame); if(rates_total<=InpMinor || rates_total<=InpMajor) return(0); //--- counting from 0 to rates_total ArraySetAsSeries(ExtMinorBuffer,false); ArraySetAsSeries(ExtMajorBuffer,false); ArraySetAsSeries(open,false); ArraySetAsSeries(high,false); ArraySetAsSeries(low,false); ArraySetAsSeries(close,false); //--- initial zero if(prev_calculated<1) { for(i=0; i<per; i++) ExtMinorBuffer[i]=0.0; for(i=0; i<per; i++) ExtMajorBuffer[i]=0.0; for(i=0; i<ExtBegin; i++) } //--- Minor pos=per-1; if(prev_calculated>per) pos=prev_calculated-1; for(i=pos; i<rates_total; i++) { high_value=high[i]; low_value=low[i]; k=i+1-per; while(k<=i) { if(high_value<high[k]) high_value=high[k]; if(low_value>low[k]) low_value=low[k]; k++; } ExtMinorBuffer[i]=high_value-((high_value-low_value)*0.1); } //--- Major pos=per-1; if(prev_calculated>per) pos=prev_calculated-1; for(i=pos; i<rates_total; i++) { high_value=high[i]; low_value=low[i]; k=i+1-per; while(k<=i) { if(high_value<high[k]) high_value=high[k]; if(low_value>low[k]) low_value=low[k]; k++; } ExtMajorBuffer[i]=low_value-((high_value-low_value)*0.1); } //--- return(rates_total); } //+------------------------------------------------------------------+ int per;
المواضيع المتشابهه | ||||
| الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
| إعادت برمجة أكسبيرت من صنعك أخ سمير | basharbna | منتدى المؤشرات و الاكسبرتات | 36 | 23 - 12 - 2018 12:11 PM |
| فرص مؤشر الغلاف: (10\2 ديلي) | نمبر ون | منتدى تداول العملات العام | 3 | 29 - 01 - 2017 04:48 PM |
| برنامج صغيرجداً لإغلاق او إعادة تشغيل الكمبيوتر في ثوانى والمفاجئة برمجة عربية | موزة حمد | استراحة بورصات | 0 | 20 - 01 - 2013 10:58 AM |
| طلب برمجة مؤشر | theatco | منتدى المؤشرات و الاكسبرتات | 34 | 12 - 07 - 2010 01:15 AM |