您需要 登录 才可以下载或查看,没有帐号?注册
先谢谢了。
2012-10-21 10:46 上传
下载附件 (3.02 KB)
//----
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 LightSeaGreen
//---- input parameters
extern int CCIPeriod = 14;
//---- buffers
double CCIBuffer[];
double RelBuffer[];
double DevBuffer[];
double MovBuffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
string short_name;
//---- 3 additional buffers are used for counting.
IndicatorBuffers(4);
SetIndexBuffer(1, RelBuffer);
SetIndexBuffer(2, DevBuffer);
SetIndexBuffer(3, MovBuffer);
//---- indicator lines
SetIndexStyle(0, DRAW_LINE);
SetIndexBuffer(0, CCIBuffer);
//----
if(CCIPeriod = 0)
{
price = (High i + Low i + Close i ) / 3;
RelBuffer i = price - MovBuffer i
i--;
}
//---- cci counting
i = Bars - CCIPeriod + 1;
if(counted_bars CCIPeriod - 1)
i = Bars - counted_bars - 1;
while(i = 0)
{
if(DevBuffer i == 0.0)
CCIBuffer i = 0.0;
else
CCIBuffer i = RelBuffer i / DevBuffer i
i--;
}
//----
return(0);[/td][/tr]
外汇交易有很大的风险性,本站所有资源均来自网络,请选择使用,如若出现亏损,本站不承担任何责任!