- UID
- 2
- 积分
- 2892817
- 威望
- 1396440 布
- 龙e币
- 1496377 刀
- 在线时间
- 13326 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2024-12-26
|
【均量线(Volume Avg)】
- inputs:
- AvgLength( 50 ),
- AlertPct( 50 ),
- UpColor( Cyan ),
- DownColor( Red ) ;
- variables:
- var0( 0 ),
- var1( 0 ),
- var2( 0 ),
- var3( 0 ),
- var4( 1 + AlertPct * .01 ),
- var5( NumToStr( AlertPct, 2 ) ) ;
- if BarType >= 2 and BarType < 5 then
- begin
- var0 = Volume ;
- var1 = AverageFC( Volume, AvgLength ) ;
- Plot1( var0, "Vol" ) ;
- Plot2( var1, "VolAvg" ) ;
- condition1 = var0 crosses over var1 * var4 ;
- if condition1 then
- Alert( "Volume breaking through " + var5 + "% above its avg" ) ;
- end
- else
-
- begin
- var2 = Ticks ;
- var3 = AverageFC( Ticks, AvgLength ) ;
- Plot1( var2, "Vol" ) ;
- Plot2( var3, "VolAvg" ) ;
-
- condition1 = var2 crosses over var3 * var4 ;
- if condition1 then
- Alert( "Volume breaking through " + var5 + "% above its avg" ) ;
- end ;
-
- if C > C[1] then
- SetPlotColor( 1, UpColor )
- else if C < C[1] then
- SetPlotColor( 1, DownColor ) ;
复制代码 |
论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
|