//+------------------------------------------------------------------+
//| |
//| http://ggg750075.blog.163.com/ |
//+------------------------------------------------------------------+
#property copyright "QQ:283089600————》》》点此文字下载更多指标《《《————微信:G7512G"
#property link "http://pan.baidu.com/s/1c2wxGzA"
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Orange
#property indicator_color2 SlateBlue
double g_ibuf_76[];
double g_ibuf_80[];
double g_ifractals_84;
double g_ifractals_92;
int g_bars_100;
int init() {
IndicatorBuffers(2);
SetIndexArrow(0, 119);
SetIndexArrow(1, 119);
SetIndexStyle(0, DRAW_ARROW, STYLE_DOT, 0, Orange);
SetIndexDrawBegin(0, g_bars_100 - 1);
SetIndexBuffer(0, g_ibuf_76);
SetIndexLabel(0, "Resistance");
SetIndexStyle(1, DRAW_ARROW, STYLE_DOT, 0, SlateBlue);
SetIndexDrawBegin(1, g_bars_100 - 1);
SetIndexBuffer(1, g_ibuf_80);
SetIndexLabel(1, "Support");
return (0);
}
int start() {
for (g_bars_100 = Bars; g_bars_100 >= 0; g_bars_100--) {
g_ifractals_84 = iFractals(NULL, 0, MODE_UPPER, g_bars_100);
if (g_ifractals_84 > 0.0) g_ibuf_76[g_bars_100] = High[g_bars_100];
else g_ibuf_76[g_bars_100] = g_ibuf_76[g_bars_100 + 1];
g_ifractals_92 = iFractals(NULL, 0, MODE_LOWER, g_bars_100);
if (g_ifractals_92 > 0.0) g_ibuf_80[g_bars_100] = Low[g_bars_100];
else g_ibuf_80[g_bars_100] = g_ibuf_80[g_bars_100 + 1];
}
return (0);
}
//+------------------------------------------------------------------+
//| |
//| http://ggg750075.blog.163.com/ |
//+------------------------------------------------------------------+
#property copyright "QQ:283089600————》》》点此文字下载更多指标《《《————微信:G7512G"
#property link "http://pan.baidu.com/s/1c2wxGzA"
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Blue
//---- buffers
double v1[];
double v2[];
double val1;
double val2;
int i;
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int init()
{
//---- drawing settings
SetIndexArrow(0, 119);
SetIndexArrow(1, 119);
//----
SetIndexStyle(0, DRAW_ARROW, STYLE_DOT, 1);
SetIndexDrawBegin(0, i-1);
SetIndexBuffer(0, v1);
SetIndexLabel(0,"Resistance");
//----
SetIndexStyle(1,DRAW_ARROW,STYLE_DOT,1);
SetIndexDrawBegin(1,i-1);
SetIndexBuffer(1, v2);
SetIndexLabel(1,"Support");
//----
return(0);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int start()
{
i = Bars;
while(i >= 0)
{
val1 = iFractals(NULL, 0, MODE_UPPER, i);
//----
if(val1 > 0)
v1 = High;
else
v1 = v1[i+1];
val2 = iFractals(NULL, 0, MODE_LOWER, i);
//----
if(val2 > 0)
v2 = Low;
else
v2 = v2[i+1];
i--;
}
return(0);
}
//+------------------------------------------------------------------+
|