[MT4指标]均线交叉箭头指示-每日MT4指标交流-131219
每日一研究指标,希望自己能把指标编写的事情 从新捡起来
每天看盘的时间太孤寂,还是干点喜欢的事情吧
先把自己电脑上的指标都放上来
加上说明 有源码的贴上来看看 大家一起研究研究核心的东西
虽然我一直是道氏理论的坚定支持者 但吸取百家之长还是正途
//+------------------------------------------------------------------+
//| EMA-Crossover_Signal.mq4 |
//| Copyright ?2005, Jason Robinson (jnrtrading)韬客翻译 |
//| http://www.jnrtading.co.uk 该地址已经挂了 还是来韬客玩吧 |
//+------------------------------------------------------------------+
/*
+------------------------------------------------------------------+
| Allows you to enter two ema periods and it will then show you at |
| Which point they crossed over. It is more usful on the shorter |
| periods that get obscured by the bars / candlesticks and when |
| the zoom level is out. Also allows you then to remove the emas |
| from the chart. (emas are initially set at 5 and 6) |
+------------------------------------------------------------------+
+------------------------------------------------------------------+
| 主要就是用箭头指示出来双ema的交叉点所在 让大家能容易的 |
| 直观的看到指标指示方向,该指标默认的是 ema的5和6|
|extern int FasterMode = 1; //0=sma, 1=ema, 2=smma, 3=lwma 指标的计算方式
extern int FasterMA = 21周期;
extern int SlowerMode = 1; //0=sma, 1=ema, 2=smma, 3=lwma满速的计算方式 具体的参数 自己百度一下
extern int SlowerMA = 34周期;
+------------------------------------------------------------------+
*/
#property copyright "Copyright ?2005, Jason Robinson (jnrtrading)"
#property link "http://www.jnrtrading.co.uk"
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 DodgerBlue
#property indicator_color2 Red
double CrossUp;
double CrossDown;
extern int FasterMode = 1; //0=sma, 1=ema, 2=smma, 3=lwma
extern int FasterMA = 21;
extern int SlowerMode = 1; //0=sma, 1=ema, 2=smma, 3=lwma
extern int SlowerMA = 34;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0, DRAW_ARROW, EMPTY);
SetIndexArrow(0, 233);
SetIndexBuffer(0, CrossUp);
SetIndexStyle(1, DRAW_ARROW, EMPTY);
SetIndexArrow(1, 234);
SetIndexBuffer(1, CrossDown);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start() {
int limit, i, counter;
double fasterMAnow, slowerMAnow, fasterMAprevious, slowerMAprevious, fasterMAafter, slowerMAafter;
double Range, AvgRange;
int counted_bars=IndicatorCounted();
//---- check for possible errors
if(counted_bars<0) return(-1);
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(i = 0; i <= limit; i++) {
counter=i;
Range=0;
AvgRange=0;
for (counter=i ;counter<=i+9;counter++)
{
AvgRange=AvgRange+MathAbs(High[counter]-Low[counter]);
}
Range=AvgRange/10;
fasterMAnow = iMA(NULL, 0, FasterMA, 0, FasterMode, PRICE_CLOSE, i);
fasterMAprevious = iMA(NULL, 0, FasterMA, 0, FasterMode, PRICE_CLOSE, i+1);
fasterMAafter = iMA(NULL, 0, FasterMA, 0, FasterMode, PRICE_CLOSE, i-1);
slowerMAnow = iMA(NULL, 0, SlowerMA, 0, SlowerMode, PRICE_CLOSE, i);
slowerMAprevious = iMA(NULL, 0, SlowerMA, 0, SlowerMode, PRICE_CLOSE, i+1);
slowerMAafter = iMA(NULL, 0, SlowerMA, 0, SlowerMode, PRICE_CLOSE, i-1);
if ((fasterMAnow > slowerMAnow) && (fasterMAprevious < slowerMAprevious) && (fasterMAafter > slowerMAafter)) {
CrossUp = Low - Range*0.9;
}
else if ((fasterMAnow < slowerMAnow) && (fasterMAprevious > slowerMAprevious) && (fasterMAafter < slowerMAafter)) {
CrossDown = High + Range*0.9;
}
}
return(0);
}
附图一张 大家应该能直观的观察下 我先放上来 然后再把每句的含义 附在里面 让大家一起研究
也让自己能从新捡起这个能力哈QQ截图20131219102710.jpg
遇到矛盾 先站在对方的立场上想想问题,先试着去理解别人
● 如何使用WinMTR查询平台连接流畅度
发表于:2013-12-19 04:45只看该作者
2楼
谢谢分享!!
发表于:2018-01-06 15:25只看该作者
3楼
谢谢朋友分享
韬客社区www.talkfx.co
发表于:2018-01-10 03:54只看该作者
4楼
谢谢分享~~~
韬客社区www.talkfx.co
发表于:2018-05-04 16:49只看该作者
7楼
谢谢分享
韬客社区www.talkfx.co
发表于:2018-05-04 19:46只看该作者
8楼
LOOKS GREAT I WILL TEST
韬客社区www.talkfx.co