[MT4指标]蜡烛图趋势指标
主图指标 蜡烛图趋势指标
mt4指标类型:趋势指标
是否能用在mt4手机版上:否
是否含有未来函数:无
//+------------------------------------------------------------------+
//| CandlesticksBW.mq4 |
//| Vladimir |
//| [email protected] |
//+------------------------------------------------------------------+
// 朽耜疣耜? 疋鬻彘 镱 妈朦?祚?
#property copyright \"Vladimir\"
#property link \"[email protected]\"
#property indicator_chart_window
#property indicator_buffers 7
#property indicator_color1 LimeGreen
#property indicator_color2 Red
#property indicator_color3 LimeGreen
#property indicator_color4 Red
#property indicator_color5 White
//---- buffers
double ExtMapBuffer1;
double ExtMapBuffer2;
double ExtMapBuffer3;
double ExtMapBuffer4;
double ExtMapBuffer5;
double ExtMapBuffer6;
double ExtM;//----
int ExtCountedBars=0;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_HISTOGRAM,0,1,LimeGreen);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_HISTOGRAM,0,1,Red);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexStyle(2,DRAW_HISTOGRAM,0,2,LimeGreen);
SetIndexBuffer(2,ExtMapBuffer3);
SetIndexStyle(3,DRAW_HISTOGRAM,0,2,Red);
SetIndexBuffer(3,ExtMapBuffer4);
SetIndexStyle(4,DRAW_HISTOGRAM,0,1,White);
SetIndexBuffer(4,ExtMapBuffer5);
SetIndexStyle(5,DRAW_HISTOGRAM,0,1,White);
SetIndexBuffer(5,ExtMapBuffer6);
SetIndexStyle(4,DRAW_NONE,0,1,LimeGreen);
return(0);
}
int start()
{ExtM=Point;
if (Bars<=10) return(0);
ExtCountedBars=IndicatorCounted();
//---- check for possible errors
if (ExtCountedBars<0) return(-1);
//---- last counted bar will be recounted
if (ExtCountedBars>0) ExtCountedBars--;
int pos=Bars-ExtCountedBars-1;
while (pos>=0)
{
if (iAO(NULL,0,pos)>=iAO(NULL,0,pos+1) && iAC(NULL,0,pos)>=iAC(NULL,0,pos+1))
{
ExtMapBuffer1[pos]=High[pos];
ExtMapBuffer2[pos]=Low[pos];
if (Open[pos]>Close[pos])
{ ExtMapBuffer3[pos]=Open[pos]; ExtMapBuffer4[pos]=Close[pos]; }
else
if (Open[pos]Close[pos])
{ ExtMapBuffer3[pos]=Close[pos]; ExtMapBuffer4[pos]=Open[pos]; }
}
pos--;
}
return(0);
}
发表于:2015-09-08 21:17只看该作者
3楼
这个实用,谢谢楼主分享!!
韬客社区www.talkfx.co
发表于:2015-09-11 14:53只看该作者
4楼
学习33333
韬客社区www.talkfx.co
发表于:2015-09-19 01:54只看该作者
5楼
很好
韬客社区www.talkfx.co
6楼
楼主为什么不上张图片
韬客社区www.talkfx.co
发表于:2017-08-09 00:41只看该作者
8楼
缺钱,灌水赚通宝,谢谢分享!!
韬客社区www.talkfx.co
发表于:2017-08-15 12:00只看该作者
10楼
看到8楼是来灌水得通宝的,我就放心了
韬客社区www.talkfx.co
发表于:2017-09-07 00:49只看该作者
11楼
几十个模版指标 总有一个适合你
韬客社区www.talkfx.co
发表于:2018-06-22 11:25只看该作者
12楼
谢谢楼主分享
韬客社区www.talkfx.co
发表于:2018-08-30 15:07只看该作者
13楼
缺钱,灌水赚通宝,谢谢分享!
韬客社区www.talkfx.co