发表于:2008-10-10 07:14只看该作者
2楼
看上去不错喔
韬客社区www.talkfx.co
3楼
昨天从网上找到了一个均线变色指标,求秃鹫老师看一下,它的程序是否准确?
谢谢均线变色指标.rar
韬客社区www.talkfx.co
发表于:2008-10-11 02:36只看该作者
4楼
楼主有想法非常好,不过我想如果用这个来做单过于粗糙了一点。
为了更清楚地看到均线上升下降的情况,楼主不妨先用下面这个指标来判断分析一下,这是一个计算均线相邻两点的差的公式,柱线向上表示均线是上升的,柱线向下表示均线是下降的,柱线为零则均线走平。
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Green
#property indicator_level1 0
extern int SMA_Period=34;
double SMAx1;
double SMAx2;
void init() {
SetIndexBuffer(0, SMAx1);
SetIndexBuffer(1, SMAx2);
SetIndexStyle(0,DRAW_HISTOGRAM);
SetIndexStyle(1,DRAW_HISTOGRAM);
}
void start() {
int limit;
int counted_bars=IndicatorCounted();
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(int t=0; t=0) {SMAx1[t]=temp;SMAx2[t]=0;}
else {SMAx2[t]=temp;SMAx1[t]=0;}
}
}
发表于:2008-10-11 02:41只看该作者
5楼
这是上面程式的结果图
[ 本帖最后由 秃鹫 于 2008-10-11 10:54 编辑 ]
000.gif

7楼
谢谢秃鹫教师,可惜我不会编程,麻烦您将指标上传一下吧,我仔细研究一下
韬客社区www.talkfx.co
8楼
呵呵,按照论坛的教程,一步一步粘贴下去,居然就可以了。您这个指标和我上面传的变色指标的计算方法是一样的,不过柱线的显示我想有更深的可以研究开发的必要,谢谢老师!!
韬客社区www.talkfx.co
发表于:2008-11-19 11:41只看该作者
9楼




韬客社区www.talkfx.co
发表于:2008-11-20 06:30只看该作者
10楼





韬客社区www.talkfx.co
发表于:2016-12-07 08:09只看该作者
11楼
感谢分享
韬客社区www.talkfx.co
发表于:2016-12-07 14:32只看该作者
12楼
感谢分享
韬客社区www.talkfx.co