|
/部分
#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 White
//---- indicator parameters
extern int ExtDepth=5;
extern int ExtDeviation=3;
extern int ExtBackstep=1;
//---- indicator buffers
double ZigzagBuffer[];
double HighMapBuffer[];
double LowMapBuffer[];
int level=3; // recounting\'s depth
bool downloadhistory=false;
extern color 标记颜色=Black;
extern double 间隔比例=0.02;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
IndicatorBuffers(3);
//---- drawing settings
SetIndexStyle(0,3);
//---- indicator buffers mapping
SetIndexBuffer(0,ZigzagBuffer);
SetIndexBuffer(1,HighMapBuffer);
SetIndexBuffer(2,LowMapBuffer);
SetIndexEmptyValue(0,0.0);
//---- indicator short name
IndicatorShortName(\"ZigZag(\"+ExtDepth+\",\"+ExtDeviation+\",\"+ExtBackstep+\")\");
//---- initialization done
return(0);
}
来源: 2017年正在使用的zigzag指标 |
|