

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red // Low / Minor
#property indicator_color2 Blue // High / Major
//--- input parameters
input int TimeFrame=0; // Timeframe
input int InpMinor=50; // Low
input int InpMajor=50; // High
//--- buffers
double ExtMinorBuffer[];
double ExtMajorBuffer[];
//---
int ExtBegin;
//+------------------------------------------------------------------+
//| initialization
//+------------------------------------------------------------------+
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 start()
{
datetime TimeArray[];
int i,limit,y=0,counted_bars=IndicatorCounted();
ArrayCopySeries(TimeArray,MODE_TIME,Symbol(),TimeFrame);
limit=Bars-counted_bars+TimeFrame/Period();
for(i=0,y=0;i<limit;i++)
{
if (Time[i]<TimeArray[y]) y++;
double high_value_minor = iHigh(NULL,TimeFrame,iHighest(NULL,TimeFrame,MODE_HIGH,InpMinor,y));
double low_value_minor = iLow(NULL,TimeFrame, iLowest(NULL,TimeFrame,MODE_LOW ,InpMinor,y));
ExtMinorBuffer[i]=high_value_minor-((high_value_minor-low_value_minor)*0.1);
double high_value_major = iHigh(NULL,TimeFrame,iHighest(NULL,TimeFrame,MODE_HIGH,InpMajor,y));
double low_value_major = iLow(NULL,TimeFrame, iLowest(NULL,TimeFrame,MODE_LOW ,InpMajor,y));
ExtMajorBuffer[i]=low_value_major-((high_value_major-low_value_major)*0.1);
}
return(0);
} 

المواضيع المتشابهه | ||||
| الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
| إعادت برمجة أكسبيرت من صنعك أخ سمير | 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 |