[MT4指标]英镑叉盘策略
叉盘系列之英镑
#property copyright "Copyright 2009, sHrung."
#property link "http://www.something.com/"
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 LimeGreen
//---- input parameters
extern int MomPeriod=1000;
//---- buffers
//--- currencies
double GBP;
//---
double ac_gbpusd;
double ac_eurgbp;
double ac_gbpjpy;
double ac_gbpchf;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
string short_name;
//---- additional buffers used for counting.
IndicatorBuffers(5);
//---- indicator line
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,GBP);
SetIndexBuffer(1,ac_eurgbp);
SetIndexBuffer(2,ac_gbpusd);
SetIndexBuffer(3,ac_gbpchf);
SetIndexBuffer(4,ac_gbpjpy);
//---- name for DataWindow and indicator subwindow label
short_name="Accu/Dist Graph GBP ("+MomPeriod+")";
IndicatorShortName(short_name);
SetIndexLabel(0,"GBP");
//----
SetIndexDrawBegin(0,MomPeriod);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Four legs |
//+------------------------------------------------------------------+
int start()
{
int i,counted_bars=IndicatorCounted();
int a, b, c, d, e, f, g, h, ii, j;
//----
if(Bars<=MomPeriod) return(0);
//---- initial zero
if(counted_bars<1)
for(i=1;i<=MomPeriod;i++) GBP[Bars-i]=0.0;
//----
int limia=Bars-counted_bars;
if(counted_bars>1) limia++;
for(a=0; a1) limie++;
for(e=0; e1) limih++;
for(h=0; h1) limij++;
for(j=0; j=MomPeriod) i=Bars-counted_bars-1;
while(i>=0)
{
GBP = ac_gbpusd + ac_gbpchf - ac_eurgbp + ac_gbpjpy ;
i--;
}
return(0);
}
//+------------------------------------------------------------------+eurusd-h1-fxpro-financial-services-2.jpg
发表于:2018-04-04 07:25只看该作者
2楼
有人敢用吗?
韬客社区www.talkfx.co
发表于:2018-06-12 12:56只看该作者
3楼
日内指标吗
韬客社区www.talkfx.co