- UID
- 2
- 积分
- 2874604
- 威望
- 1387331 布
- 龙e币
- 1487273 刀
- 在线时间
- 13155 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2024-11-24
|
【ModeArray】
- inputs:
- PriceValueArray[ MaxSize ]( numericarrayref ),
- Size( numericsimple ),
- Type( numericsimple ) ;
-
- variables:
- var0( 0 ),
- var1( 0 ),
- var2( -1 ) ;
- if Size > 1 then
- begin
- Value1 = SortArray( PriceValueArray, Size, -1 ) ;
- var0 = 1 ;
- var1 = 1 ;
- var2 = -1 ;
- for Value2 = 1 to Size - 1
- begin
- condition1 = PriceValueArray[Value2] = PriceValueArray[ Value2 + 1 ] ;
- if condition1 then
- var0 = var0 + 1
- else
- var0 = 1 ;
-
- condition1 = var0 > 1 and var0 >= var1 ;
- if condition1 Then
- begin
- if var0 > var1 then
- begin
- var2 = PriceValueArray[Value2] ;
- var1 = var0 ;
- end
- else
- begin
- condition1 = var0 = var1 and Type >= 0 ;
- if condition1 then
- var2 = PriceValueArray[Value2] ;
- end;
-
-
- end ;
- end ;
- end ;
- ModeArray = var2 ;
复制代码 |
论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
|