【Marney Volume Indicator】
- UID
- 2
- 积分
- 2874674
- 威望
- 1387366 布
- 龙e币
- 1487308 刀
- 在线时间
- 13156 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2024-11-24
|
【Marney Volume Indicator】
- {***********************************************}
- {Marney Indicator(TM) - Marney Volume Indicator(TM)
- Copyright Caspar Marney, Marney Capital 2010(C)}
- {***********************************************}
- input: avgLen(10), mins.in.session(1440), autobars(True), upcolor(cyan), dncolor(red);
- var: start(0), end1(0), end2(0), x(0), p(-1), count(0), avg(0), barsinday(0), DayNumber(0);
- array: xv[199,1440](0);
-
- if bartype < 2 then begin
-
- start= (sessionstarttime(1,1));
- end1= (sessionendtime(1,1));
- end2= (sessionendtime(1,2));
-
- value1 = timetominutes(start);
- value2 = timetominutes(end2);
- if start > end2 then
- value3 = 1440+(value2-value1);
-
- if start < end2 then
- value3 = -(value1-value2);
- if autobars = false then value3 = mins.in.session;
-
- barsinday = ceiling(value3/barinterval);
-
-
- if d<>d[1] then begin
- if count=barsinday then begin
- p=iff(p<avgLen-1,p+1,0);
- for x=1 to barsinday begin
- xv[p,x]=ticks[barsinday+1-x];
- end;
- end;
- count=1;
- end else count=count+1;
-
-
- if xv[avgLen-1,count]>0 then begin
- avg=0;
- for x=0 to avgLen-1 begin
- avg=avg+xv[x,count];
- end;
- avg=avg/avgLen;
- plot2(ticks,"ticks",default,1);
- plot1(avg,"avg",yellow,default,1);
- end;
- if close > open then setplotcolor(2,upcolor);
- if close < open then setplotcolor(2,dncolor);
-
- end;
-
- if bartype > 1 then begin
- avg = averagefc(v,avglen);
- plot2(v,"ticks",default,1);
- plot1(avg,"avg",yellow,default,1);
-
- if close > open then setplotcolor(2,upcolor);
- if close < open then setplotcolor(2,dncolor);
- end;
复制代码 |
论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
|
|
|
|
|
|