[MT4指标]i-Cross&Main货币交叉指标
附图指标,
mt4指标类型:趋势指标
是否能用在mt4手机版上:否
是否含有未来函数:无
i-Cross&Main货币交叉指标,显示相关货币对的强弱情况
//+------------------------------------------------------------------+
//| i-Cross&Main.mq4 |
//| 项痼麒? & aka KimIV |
//| http://www.kimiv.ru |
//| |
//| 07.01.2006 软滂赅蝾? 牮铖襦 ? 镳铊玮邃屙?? 铖眍忭 镟?. |
//+------------------------------------------------------------------+
#property copyright "项痼麒? & aka KimIV"
#property link "http://www.kimiv.ru"
#property indicator_separate_window
#property indicator_buffers 3
#property indicator_color1 Aqua
#property indicator_color2 Blue
#property indicator_color3 Red
//------- 秒钺嚯 镥疱戾眄 --------------------------------------
//------- 马屮龛? 镟疣戾蝠? 桧滂赅蝾疣 -------------------------------
extern string NameCross = "GBPCHF"; // 袜桁屙钼囗桢 牮铖襦
extern string NameMain1 = "GBPUSD"; // 袜桁屙钼囗桢 铖眍忭铋 镟瘥 1
extern string NameMain2 = "USDCHF"; // 袜桁屙钼囗桢 铖眍忭铋 镟瘥 2
extern int NumberOfBars = 1000; // 暑腓麇耱忸 徉痤? 钺聍蛤? (0-怦?)
//------- 馏翦瘥 桧滂赅蝾疣 ------------------------------------------
double buf0, buf1, buf2;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
void init() {
SetIndexBuffer(0, buf0);
SetIndexLabel (0, NameCross);
SetIndexStyle (0, DRAW_LINE, STYLE_SOLID, 2);
SetIndexEmptyValue(0, 0);
SetIndexBuffer(1, buf1);
SetIndexLabel (1, NameMain1+"*"+NameMain2);
SetIndexStyle (1, DRAW_LINE, STYLE_SOLID, 2);
SetIndexEmptyValue(1, 0);
SetIndexBuffer(2, buf2);
SetIndexLabel (2, "mid");
SetIndexStyle (2, DRAW_LINE, STYLE_SOLID, 2);
SetIndexEmptyValue(2, 0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
void deinit() {
Comment("");
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
void start() {
int LoopBegin, sh;
if (NumberOfBars==0) LoopBegin=Bars-1;
else LoopBegin=NumberOfBars-1;
LoopBegin=MathMin(Bars-1, LoopBegin);
for (sh=LoopBegin; sh>=0; sh--) {
buf0[sh]=iClose(NameCross, 0, sh);
buf1[sh]=iClose(NameMain1, 0, sh)*iClose(NameMain2, 0, sh);
buf2[sh]=(iClose(NameMain1, 0, sh)*iClose(NameMain2, 0, sh)+iClose(NameCross, 0, sh))/2;
}
}
//+------------------------------------------------------------------+i-Cross&Main-maloma.jpg
发表于:2017-08-11 10:07只看该作者
2楼
阅尽天下指标
韬客社区www.talkfx.co
发表于:2017-08-16 01:38只看该作者
3楼
阅尽天下指标
韬客社区www.talkfx.co