商达 发表于 2011-12-16 12:08:09

【已解决】关于这样的指标警报,元芳,你怎么看?

本帖最后由 chief 于 2012-10-30 18:05 编辑

[*]#property indicator_chart_window
[*]#property indicator_buffers 2
[*]#property indicator_color1 Red
[*]#property indicator_width1 2
[*]#property indicator_color2 Lime
[*]#property indicator_width2 2
[*]
[*]extern int SignalGap = 4;
[*]
[*]int dist=24;
[*]double b1[];
[*]double b2[];
[*]
[*]int init(){
[*]   SetIndexStyle(0,DRAW_ARROW,STYLE_SOLID,1);
[*]   SetIndexStyle(1,DRAW_ARROW,STYLE_SOLID,1);
[*]   SetIndexArrow(1,233);
[*]   SetIndexArrow(0,234);
[*]   SetIndexBuffer(0,b1);
[*]   SetIndexBuffer(1,b2);
[*]   return(0);
[*]}
[*]int start() {
[*]   int counted_bars=IndicatorCounted();
[*]   int k,i,j,limit,hhb,llb;
[*]   
[*]   if (counted_bars0) counted_bars--;
[*]   limit=Bars-1;
[*]   if(counted_bars>=1) limit=Bars-counted_bars-1;
[*]   if (limit=0;i--)   {
[*]      hhb = Highest(NULL,0,MODE_HIGH,dist,i-dist/2);
[*]      llb = Lowest(NULL,0,MODE_LOW,dist,i-dist/2);
[*]
[*]      if (i==hhb)
[*]         b1=High+SignalGap*Point;
[*]      if (i==llb)
[*]         b2=Low-SignalGap*Point;
[*]   }
[*]   return(0);
[*]}

复制代码
【已解决】多谢多位高手。【常来520论坛,高枕外汇眠,家中无历日,寒尽不知年。】
致谢
此处为您的辛勤劳动保留,
                     期待着出现您的名字!

spwmsrvs 发表于 2015-3-13 05:41:05

路过。。看下先。

lingling 发表于 2015-3-14 18:25:35

rf1969 发表于 2015-3-16 01:33:31

jbjvhoju 发表于 2015-4-4 03:37:38

看看怎么样

yljvqmhj 发表于 2015-4-15 03:36:37

看看是什么东西啊

iphone43S 发表于 2020-6-21 21:20:32

有竞争才有进步嘛

父亲 发表于 2020-7-6 22:33:40

帮你顶下哈!!

算平 发表于 2020-7-12 19:01:40

学习了,不错

花生牛奶 发表于 2020-7-13 13:49:04

谢谢楼主分享
页: [1] 2 3
查看完整版本: 【已解决】关于这样的指标警报,元芳,你怎么看?