[MT4指标]GA-ind趋势指标
附图指标,GA-ind趋势指标,核心思想还是均线系统 并做了相应的变化
总体上能正确显示趋势的走向
mt4指标类型:趋势指标
是否能用在mt4手机版上:否
是否含有未来函数:无
//+------------------------------------------------------------------+
//| GA-ind.mq4 |
//| Copyright ? 2008, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright ? 2008, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
//---- indicator settings
#property indicator_separate_window
#property indicator_buffers 4
#property indicator_color1 Gray
#property indicator_color2 Blue
#property indicator_color3 Red
#property indicator_color4 Yellow
#property indicator_width1 1
#property indicator_width2 1
#property indicator_width3 1
//---- indicator parameters
extern int FastEMA=8;
extern int SlowEMA=26;
extern int SignalSMA=8;
//---- indicator buffers
double MacdBufferUp;
double MacdBufferDn;
double SignalBuffer;
double MacdBuffer;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- drawing settings
SetIndexStyle(0,DRAW_ARROW);
SetIndexStyle(1,DRAW_ARROW);
SetIndexStyle(2,DRAW_ARROW);
SetIndexStyle(3,DRAW_LINE);
SetIndexDrawBegin(3,SignalSMA);
IndicatorDigits(Digits+1);
//---- indicator buffers mapping
SetIndexBuffer(0,MacdBuffer);
SetIndexBuffer(1,MacdBufferUp);
SetIndexBuffer(2,MacdBufferDn);
SetIndexBuffer(3,SignalBuffer);
//---- name for DataWindow and indicator subwindow label
IndicatorShortName("MACD("+FastEMA+","+SlowEMA+","+SignalSMA+")");
SetIndexLabel(0,"");
SetIndexLabel(1,"MACD UP");
SetIndexLabel(2,"MACD DN");
SetIndexLabel(3,"Signal");
//---- initialization done
return(0);
}
//+------------------------------------------------------------------+
//| Moving Averages Convergence/Divergence |
//+------------------------------------------------------------------+
int start()
{
int limit;
int counted_bars=IndicatorCounted();
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(int i=0; iSignalBuffer){
MacdBufferUp=MacdBuffer;
}
if(MacdBufferGA-ind_2color.jpg
发表于:2014-04-04 08:55只看该作者
2楼
韬客社区www.talkfx.co
发表于:2014-04-11 12:17只看该作者
3楼
看看。。。
韬客社区www.talkfx.co
发表于:2017-08-09 23:43只看该作者
4楼
韬客交易社区-国内最大的外汇交易社区
韬客社区www.talkfx.co
发表于:2018-07-07 06:52只看该作者
5楼
谢谢分享
韬客社区www.talkfx.co