[MT4指标]DRProjections突破区间阻力支撑指标
主图指标,DRProjections突破区间阻力支撑指标
mt4指标类型:震荡指标
是否能用在mt4手机版上:否
是否含有未来函数:无
//+------------------------------------------------------------------+
//| i-DRProjections.mq4 |
//| 疏? 茹铕? ?. aka KimIV |
//| http://www.kimiv.ru |
//| 27.08.2005 v.0.0 镱 镳铖 ? $anto$'? |
//| 软滂赅蝾? Daily Range Projections |
//| 橡钽眍玷痤忄龛? 漤邂睇? 滂囡噻铐钼 鲥? |
//| 棱蝾? 桎彖 翌爨? 腻爨痍 |
//| 29.08.2005 v.0.1 念疣犷蜿? Aleks78 |
//+------------------------------------------------------------------+
#property copyright "疏? 茹铕? ?. aka KimIV"
#property link "http://www.kimiv.ru"
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 LightBlue
#property indicator_color2 LightSalmon
//------- 马屮龛? 镟疣戾蝠? ------------------------------------------
extern int NumberOfDay = 10; // 暑腓麇耱忸 漤彘
extern bool ShowTomorrow = True; // 项赅琨忄螯 玎怛疣
//------- 馏翦瘥 桧滂赅蝾疣 ------------------------------------------
double MaxDay;
double MinDay;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
void init() {
if (ShowTomorrow) {
ObjectCreate("LineHi", OBJ_TREND, 0, 0,0, 0,0);
ObjectCreate("LineLo", OBJ_TREND, 0, 0,0, 0,0);
}
SetIndexBuffer(0, MaxDay);
SetIndexStyle (0, DRAW_LINE, STYLE_SOLID, 1);
SetIndexBuffer(1, MinDay);
SetIndexStyle (1, DRAW_LINE, STYLE_SOLID, 1);
Comment("");
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
void deinit() {
ObjectDelete("LineHi");
ObjectDelete("LineLo");
Comment("");
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start() {
double po, ph, pl, pc, x;
double MaxDay1, MinDay1, OpenDay1, CloseDay1; //+++
int currDay, i=0, j=0;
if (Period()>240) {
Comment("软滂赅蝾? i-DRProjections 礤 镱滗屦骅忄弪 以 犷脲? ?4 !");
return;
}
while (i<=NumberOfDay) {
if (currDay!=TimeDay(Time[j])) {
po = iOpen (NULL, 1440, i+1);
ph = iHigh (NULL, 1440, i+1);
pl = iLow (NULL, 1440, i+1);
pc = iClose(NULL, 1440, i+1);
if (pcpo) x = (ph + pl + pc + ph) / 2;
if (pc==po) x = (ph + pl + pc + pc) / 2;
i++;
}
currDay = TimeDay(Time[j]);
MaxDay[j] = x - pl;
MinDay[j] = x - ph;
j++;
}
//++++++++++++++++++++++++++++++++++++++++++++++++
if (ShowTomorrow) {
MaxDay1 = MarketInfo(Symbol(),MODE_HIGH);
MinDay1 = MarketInfo(Symbol(),MODE_LOW);
OpenDay1 = iOpen (NULL, 1440, 0);
CloseDay1 = Bid;
if (CloseDay1OpenDay1) x = (MaxDay1 + MinDay1 + CloseDay1 + MaxDay1) / 2;
if (CloseDay1==OpenDay1) x = (MaxDay1 + MinDay1 + CloseDay1 + CloseDay1) / 2;
ObjectSet("LineHi",OBJPROP_TIME1, Time[1]);
ObjectSet("LineLo",OBJPROP_TIME1, Time[1]);
ObjectSet("LineHi",OBJPROP_PRICE1, x - MinDay1);
ObjectSet("LineLo",OBJPROP_PRICE1, x - MaxDay1);
ObjectSet("LineHi",OBJPROP_TIME2, CurTime());
ObjectSet("LineLo",OBJPROP_TIME2, CurTime());
ObjectSet("LineHi",OBJPROP_PRICE2, x - MinDay1);
ObjectSet("LineLo",OBJPROP_PRICE2, x - MaxDay1);
ObjectSet("LineHi",OBJPROP_COLOR, indicator_color1);
ObjectSet("LineLo",OBJPROP_COLOR, indicator_color2);
ObjectSet("LineHi",OBJPROP_RAY, True);
ObjectSet("LineLo",OBJPROP_RAY, True);
ObjectSet("LineHi",OBJPROP_STYLE, STYLE_DOT);
ObjectSet("LineLo",OBJPROP_STYLE, STYLE_DOT);
}
//++++++++++++++++++++++++++++++++++++++++++++++++
}
//+------------------------------------------------------------------+
i-DRProjections_v1.jpg
发表于:2017-08-09 23:46只看该作者
2楼
韬客交易社区-国内最大的外汇交易社区
韬客社区www.talkfx.co
发表于:2018-07-07 06:50只看该作者
3楼
谢谢分享
韬客社区www.talkfx.co