精 彩 论 坛已经更名为百强频道,迁新地址www.bqpd.cn

亲爱的朋友,首先为给您带来的不便深表歉意,现因发展的需要,精彩论坛迁到新的地址http://www.bqpd.cn,还望您一如既往地支持精彩论坛,谢谢
精 彩 论 坛已经更名为百强频道,迁新地址www.bqpd.cn

论坛因发展的需要现已经迁址www.bqpd.cn,等待您的到来。谢谢


    [转帖]红宝石全能版二次开发代码专区

    分享
    avatar
    一品明灯
    Admin

    帖子数 : 292
    积分 : 720
    威望 : 4
    注册日期 : 10-03-02
    年龄 : 8

    普通 [转帖]红宝石全能版二次开发代码专区

    帖子 由 一品明灯 于 2010-03-11, 14:27

    [转帖]红宝石全能版二次开发代码专区
    ' 神六升空,中国人的骄傲!
    ' 十运开幕,家乡人的自豪!
    ' 祝大家喜中大奖,喜事连连!
    ' JSNT cyftt 10.12



    '==========================================================
    ' 间 距 分 析(增加"环距"功能)
    '==========================================================
    CpParam.Add "前期期数", 1,"{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}"
    CpParam.Add "环距", "否","{是} {否}"



    Function Main
    '===============申明或定义变量=============
    CpRowCount = CpData.RowCount '开奖期数
    CpColCount = CpData.ColCount '开奖号码个数
    CpMaxCode = CpData.MaxCode '最大号码
    CpMinCode = CpData.MinCode '最小号码
    CpCodeCount = CpData.CodeCount '号码数量




    Pub_Qq= CInt(CpParam.Value( "前期期数"))
    Pub_GJ=0
    aa=-1'



    if CpParam.Value("环距")<>"是" then
    Pub_GJ=1
    aa=-2
    end if
    qd=0



    Pub_FirstCodeIndex = 1 '第一个号码的位置
    Pub_SecondCodeIndex = CpColCount '第二个号码的位置



    '=================建表=================
    CpAna.AddField "期号",8
    CpAna.AddField "开奖号码",CpColCount*3
    For col = 0 to CpColCount +aa
    CpAna.AddField "距"&col+1,3
    Next



    'CpAna.AddField "间距形态",CpColCount*3
    CpAna.AddField "最小间距",4
    CpAna.AddField "最大间距",4
    CpAna.AddField "平均间距",4
    ' CpAna.AddField "位置间距",4
    CpAna.AddField "全距",4
    For col = 0 to CpColCount +aa
    CpAna.AddField "位"&col+1&"相同",3
    Next
    CpAna.AddField "0合计",4
    CpAna.RowCount = CpData.RowCount+qd
    CpAna.CreateTable()
    '==============算法主体============================
    ReDim JZ(CpColCount -1)



    For row = 0 to CpRowCount - 1
    JJXT = "" '间距形态
    MaxJJ = -99999 '最大间距
    MinJJ = 99999 '最小间距
    MaxCode = -9999 '最大号码
    MinCode = 9999 '最小号码
    MaxCodeWZ = -9999 '两位置间最大号码
    MinCodeWZ = 9999 '两位置间最小号码
    JJSum = 0 '间距和
    hj=0
    CpAna.Cell( row, "期号") = CpData.Seq(row)
    CpAna.Cell( row, "开奖号码") = CpData.CodeStr(row)




    For col = 0 to CpColCount+aa
    NextCol = col + 1
    Code = CpData.Code(row-qd,col)
    If NextCol < CpColCount-aa then
    JJ0 = abs(Code - CpData.Code(row-qd,NextCol))
    ' *************************** '
    If (Pub_GJ=0) and (col =CpColCount+aa) then
    JJ0 =CpData.Code(row-qd,0)+ CpMaxCode - CpData.Code(row-qd,Col)
    End If
    JZ(col)= JJ0
    JJSum = JJSum + JJ0
    JJXT = JJXT & JJ0 & " "
    xt=0
    For a =1 to ub_Qq
    hm1= CpData.Code(row-qd-a,col+1)-CpData.Code(row-qd-a,col)
    If ( Pub_GJ=1) and (col =CpColCount+aa) then
    hm1=CpData.Code(row-qd-a,0)+ CpMaxCode - CpData.Code(row-a-qd,Col)
    End If
    If JJ0 = hm1 then xt=xt+1
    Next
    if xt=0 then hj=hj+1
    CpAna.Cell( row, "位"&col+1&"相同") =xt
    If xt>0 then CpAna.Color( row,"位"&col+1&"相同") = CpColor.red
    ' *************************** '
    '找最大最小间距
    If JJ0 > MaxJJ then
    MaxJJ = JJ0
    End If
    If JJ0 < MinJJ then
    MinJJ = JJ0
    End If
    End If



    '找最大最小号码
    If Code > MaxCode then
    MaxCode = Code
    End If
    If Code < MinCode then
    MinCode = Code
    End If

    If col >= Pub_FirstCodeIndex-1 And col < Pub_SecondCodeIndex then
    If Code > MaxCodeWZ then
    MaxCodeWZ = Code
    End If
    If Code < MinCodeWZ then
    MinCodeWZ = Code
    End If
    End If
    Next
    CpAna.Cell( row, "0合计") =hj
    CpAna.Color( row, "0合计") = CpColor.blue



    For col = 0 to CpColCount+aa
    tl=""
    If len(JZ(col))<2 then tl="0"
    CpAna.Cell( row, "距"&col+1) =tl&JZ(col)
    CpAna.Color( row, "距"&col+1) = CpColor.blue
    Next
    ' CpAna.Cell( row, "间距形态") = JJXT
    CpAna.Cell( row, "最小间距") = MinJJ
    CpAna.Cell( row, "最大间距") = MaxJJ
    CpAna.Cell( row, "平均间距") = JJSum \ (CpColCount-1)
    ' CpAna.Cell( row, "位置间距") = MaxCodeWZ - MinCodeWZ
    CpAna.Cell( row, "全距") = MaxCode - MinCode
    Next



    End Function


    _________________
    一流的条件 精彩的论坛
    avatar
    一品明灯
    Admin

    帖子数 : 292
    积分 : 720
    威望 : 4
    注册日期 : 10-03-02
    年龄 : 8

    普通 回复: [转帖]红宝石全能版二次开发代码专区

    帖子 由 一品明灯 于 2010-03-11, 14:27

    re:'===================...
    '==========================================================
    ' 位置均值偏差
    '==========================================================
    CpParam.Add "均值期数", 7, "{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}"
    CpParam.Add "偏差±", 3,"{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}"
    Function Main
    CpRowCount = CpData.RowCount +1
    CpColCount = CpData.ColCount
    Pub_FD = CInt(CpParam.Value("偏差±"))
    Pub_QS = CInt(CpParam.Value("均值期数"))
    If Pub_QS> CpColCount Then
    ub_QS=CpColCount
    End if
    CpAna.AddField "期号",8
    CpAna.AddField "开奖号码", CpColCount*3
    For i=0 to CpColCount-1
    CpAna.AddField i+1&"均",4
    Next
    For i=CpColCount to 2*CpColCount-1
    k=i-CpColCount+1
    CpAna.AddField k&"偏",4
    Next
    CpAna.AddField"±"& Pub_FD& "内个数",3
    CpAna.AddField"大于均值个数",4
    CpAna.AddField"等于均值个数",4
    CpAna.AddField"小于均值个数",4
    CpAna.RowCount = CpRowCount
    CpAna.CreateTable()

    For A = 0 to CpRowCount-2
    CpAna.Cell(A,"期号")=CpData.Seq(A)
    CpAna.Cell(A,"开奖号码")=CpData.CodeStr(A)
    Codeb_fd=0
    Codeb_xy=0
    Codeb_ty=0
    Codeb_dy=0
    If A > Pub_QS-2 Then
    For B =0 to CpColCount-1
    Code=0
    For qs =A- Pub_QS to A-1
    Code=CpData.Code(qs,B)+Code
    Next
    Code=int(Code/Pub_QS+0.5)
    Codebc=CpData.Code(A,B)-Code
    CpAna.Cell(A,(B+1)&"均")=Code
    If Codebc>-Pub_FD-1 and Codebc Codeb_fd=Codeb_fd+1
    End if
    cl=CpColor.Blue
    If Codebc<0 Then
    Codeb_xy=Codeb_xy+1
    cl=CpColor.Green
    ElseIf Codebc=0 Then
    Codeb_ty=Codeb_ty+1
    cl=CpColor.Red
    Else
    Codeb_dy=Codeb_dy+1
    End if
    CpAna.Cell(A,(B+1)&"偏")=Codebc
    CpAna.Color(A,(B+1)&"偏") =cl




    CpAna.Cell(A,"±"& Pub_FD& "内个数")=Codeb_fd
    CpAna.Color(A,"±"& Pub_FD& "内个数") = CpColor.Fuchsia
    Next
    CpAna.Cell(A,B+3+CpColCount)=Codeb_dy
    CpAna.Color(A,B+3+CpColCount) =CpColor.Blue
    CpAna.Cell(A,B+4+CpColCount)=Codeb_ty
    CpAna.Color(A,B+4+CpColCount) =CpColor.red
    CpAna.Cell(A,B+5+CpColCount)=Codeb_xy
    CpAna.Color(A,B+5+CpColCount) =CpColor.Green
    End if
    Next



    A=CpRowCount-1
    For B =0 to CpColCount-1
    Code=0
    For qs =A- Pub_QS to A-1
    Code=CpData.Code(qs,B)+Code
    Next
    Code=int(Code/Pub_QS+0.5)
    Codebc=CpData.Code(A,B)-Code
    CpAna.Cell(A,(B+1)&"均")=Code
    CpAna.Color(A,(B+1)&"均") = CpColor.Red
    Next
    CpAna.Cell(CpRowCount-1, "期号") ="下一期"
    End Function


    _________________
    一流的条件 精彩的论坛
    avatar
    一品明灯
    Admin

    帖子数 : 292
    积分 : 720
    威望 : 4
    注册日期 : 10-03-02
    年龄 : 8

    普通 回复: [转帖]红宝石全能版二次开发代码专区

    帖子 由 一品明灯 于 2010-03-11, 14:27

    re:'===================...
    '==========================================================
    ' 加减分析(1107更新)
    '==========================================================
    CpParam.Add "选择","加法","{加法}{减法}{加减法}{加法(一列)}{减法(一列)}{加减法(一列)}"
    CpParam.Add "几", 6,"{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}"
    CpParam.Add "位", 6,"{0}{1}{2}{3}{4}{5}{6}{7}{8}"
    Function Main
    '===============申明或定义变量=============
    CpRowCount = CpData.RowCount
    CpColCount = CpData.ColCount
    CpMaxCode = CpData.MaxCode
    CpMinCode = CpData.MinCode
    CpCodeCount = CpData.CodeCount
    '=================建表=================
    n = CInt(CpParam.Value("几"))
    WZ=CInt(CpParam.Value("位"))
    sz =CpParam.Value("选择")
    if n> CpCodeCount then n=CpCodeCount



    if WZ>CpColCount then WZ=CpColCount
    Pub_wz1=1
    Pub_wz2=CpColCount
    if WZ<>0 then
    Pub_wz1=WZ
    Pub_wz2=WZ
    end if
    ZJS1=1
    ZJS2=n
    if sz="减法(一列)" or sz="减法" then
    ZJS1=-n
    ZJS2=-1
    end if
    if sz="加减法(一列)" or sz="加减法" then
    ZJS1=-n
    ZJS2=n
    end if
    cfjs=0
    if sz="加法(一列)" or sz="减法(一列)" or sz="加减法(一列)" then
    cfjs=1
    end if
    CpAna.AddField "期 号",8
    For i = 1 to CpColCount
    CpAna.AddField "基"&i,3
    Next
    CpAna.AddField "中奖个数",8
    if cfjs=0 then
    For i =ZJS1 to ZJS2
    ss=""
    if i>0 then ss="+"
    if i<>0 and (CpMinCode+WZ<>0) then CpAna.AddField ss&i&"中奖" ,5
    Next
    For i =0 to CpColCount
    if (CpMinCode+WZ<>0) then CpAna.AddField i&"个数" ,4
    Next
    For i =ZJS1 to ZJS2
    ss=""
    if i>0 then ss="+"
    if i<>0 then CpAna.AddField "上期奖号("&ss&i&")列表" ,CpColCount*3
    Next
    Else
    s1=""
    if ZJS1>0 then s1="+"
    s2=""
    if ZJS2>0 then s2="+"
    sa=s1&ZJS1&" ~ "&s2&ZJS2
    CpAna.AddField "列表码数",8
    CpAna.AddField "上期奖号 "&sa&" 列表" , CpCodeCount*3
    End If
    CpAna.RowCount = CpData.RowCount+1
    CpAna.CreateTable()
    ReDim Zj(n)
    ReDim fZj(n)
    ReDim wZj(CpColCount+1)
    ReDim gg(CpColCount+1)
    For row =0 to CpRowCount-1
    CpAna.Cell(row,0) = CpData.Seq(row)
    For j = 0 to CpColCount-1
    tl=""
    If CpData.Code(row,j)<10 and CpMinCode>0 Then tl="0"
    CpAna.Cell(row, "基"&(j+1)) = tl&CpData.Code(row,j)
    Next
    For k=1 to CpColCount
    wZj(k-1)=0
    gg(k-1)=0
    Next
    gg(CpColCount)=0
    For k=ZJS1 to ZJS2
    If k<0 Then fZj(-k)=0
    If k>0 Then Zj(k) =0
    Next
    Pubzslb=""
    mslb=0
    nn1=0
    nn2=0
    For k=ZJS1 to ZJS2
    if k<>0 then
    zslb=""
    For i =Pub_wz1 to Pub_wz2
    uo= k+ CpData.Code(row,i-1)
    If uo>CpMaxCode and CpMinCode>0 then uo=uo-CpMaxCode
    If uo>CpMaxCode and CpMinCode>0 then uo=uo-CpMaxCode
    If uo>CpMaxCode and CpMinCode=0 then uo=uo-CpMaxCode-1
    If uo>CpMaxCode and CpMinCode=0 then uo=uo-CpMaxCode-1
    If uo0 then uo=uo+CpMaxCode
    If uo0 then uo=uo+CpMaxCode
    If uoIf uo tl=""
    If uo<10 and CpMinCode>0 Then tl="0"
    zslb=zslb&tl&uo&" "
    If (InStr( Pubzslb,tl&uo)=0) and cfjs=1 Then
    ubzslb=Pubzslb&tl&uo&" "
    mslb=mslb+1
    end if
    For ii =Pub_wz1 to ub_wz2
    If uo=CpData.Code(row+1,ii-1) Then
    wZj(ii-1)=wZj(ii-1)+1
    If row If (CpMinCode+WZ<>0) Then
    If k<0 Then fZj(-k)= fZj(-k)+1
    If k>0 Then Zj(k)=Zj(k)+1
    End if
    If CpMinCode>0 Then Exit For
    End if
    Next
    Next
    zjsum=0
    For ii =Pub_wz1 to ub_wz2
    If wZj(ii-1) >0 Then zjsum=zjsum+1
    Next
    ss=""
    if k>0 then ss="+"
    If rowIf rowIf cfjs=0 Then CpAna.Cell(row+1, "上期奖号("&ss&k&")列表")=zslb
    If cfjs=1 Then
    mnm=""
    For er =CpMinCode to CpMaxCode
    tl=""
    If er<10 and CpMinCode>0 Then tl="0"
    If (InStr( Pubzslb,tl&er)>0) Then mnm=mnm&tl&er&" "
    Next
    CpAna.Cell(row+1, "上期奖号 "&sa&" 列表")=mnm
    CpAna.Cell(row+1, "列表码数")=mslb
    End if
    If row If k<0 and (CpMinCode+WZ<>0) Then CpAna.Cell(row+1,ss&k&"中奖")=fZj(-k)
    If k>0 and (CpMinCode+WZ<>0) Then CpAna.Cell(row+1,ss&k&"中奖")=Zj(k)
    End if
    End if
    Next
    For k=ZJS1 to ZJS2
    If k<0 and row If k>0 and rowNext
    For k=0 to CpColCount
    If row0) Then



    CpAna.Cell(row+1,k&"个数")=gg(k)



    end if
    If row0) Then



    CpAna.Color (row+1,k&"个数")=CpColor.blue



    end if
    Next
    Next
    For k=Pub_wz1 to Pub_wz2
    CpAna.bkColor(row, "基"&k)=CpColor.Green
    Next
    CpAna.Cell(row,0)="分析位置"
    CpAna.Color(row, 0)=CpColor.Green
    End Function



    ' 说明:
    ' (1)"选择":"加法","减法","加减法"
    ' 列表中按上期奖号加减1,上期奖号加减2,……,多列显示



    ' "加法(一列)","减法(一列)","加减法(一列)"
    ' 列表中将上期奖号加减1,上期奖号加减2,……,合并为一列显示



    ' (2)"几":加减法中的最大值,最小值为1(从1加减到几)。



    ' (3)"位":第几个位置加减(有色标表示)
    ' 其中,设为0值时,指所有位置;大于最大位置数值时,设为最大位置数值。
    ' 当特别号码最大值小于基本号码最大值时,去掉特别号码( 双色球号码
    ' 设置为6个红球),否则统计出错。
    ' (4)体彩7位数中"位"设为0值时,不统计"上期奖号加减1,上期奖号加减2,
    ' ……,"各列中的中奖个数。
    ' (5)运行时请将以上说明剪切另存,避免出错。


    _________________
    一流的条件 精彩的论坛
    avatar
    一品明灯
    Admin

    帖子数 : 292
    积分 : 720
    威望 : 4
    注册日期 : 10-03-02
    年龄 : 8

    普通 回复: [转帖]红宝石全能版二次开发代码专区

    帖子 由 一品明灯 于 2010-03-11, 14:28

    re:'===================...
    '==========================================================
    ' 两期两两和值
    '==========================================================
    CpParam.Add "前期位数", 1, "{1}{2}{3}{4}{5}{6}{7}"
    Function Main
    CpRowCount = CpData.RowCount
    CpColCount = CpData.ColCount
    CpMaxCode = CpData.MaxCode
    CpMinCode = CpData.MinCode
    ub_VS = CInt(CpParam.Value("前期位数"))
    If Pub_VS> CpColCount Then '
    ub_VS=CpColCount
    End if
    CpAna.AddField "期号",8
    CpAna.AddField "开奖号码",20
    For i=0 to CpColCount-1
    CpAna.AddField Pub_VS&"+"&i+1,4
    Next
    CpAna.RowCount = CpRowCount
    CpAna.CreateTable()
    For A = 0 to CpRowCount-1
    CpAna.Cell(A,"期号")=CpData.Seq(A)
    CpAna.Cell(A,"开奖号码")=CpData.CodeStr(A)
    If A > 0 Then
    For B =0 to CpColCount-1
    Code= CpData.Code(A-1,Pub_VS-1)+ CpData.Code(A,B)
    CpAna.Cell(A,B+2)=Code
    Next
    End if
    Next
    End Function


    _________________
    一流的条件 精彩的论坛
    avatar
    一品明灯
    Admin

    帖子数 : 292
    积分 : 720
    威望 : 4
    注册日期 : 10-03-02
    年龄 : 8

    普通 回复: [转帖]红宝石全能版二次开发代码专区

    帖子 由 一品明灯 于 2010-03-11, 14:29

    re:'===================...
    '==========================================================
    ' 同 位 形 态
    '==========================================================
    CpParam.Add "前期期数", 5'用户设置参数
    CpParam.Add "基号", 0,"{0}{1}{2}{3}{4}{5}{6}{7}"
    Function Main
    '===============申明或定义变量=============
    CpRowCount = CpData.RowCount '开奖期数
    CpColCount = CpData.ColCount '开奖号码个数
    CpMaxCode = CpData.MaxCode '最大号码
    CpMinCode = CpData.MinCode '最小号码
    CpCodeCount = CpData.CodeCount '号码数量



    Pub_QS = CInt(CpParam.Value("前期期数"))
    Pub_JH = CInt(CpParam.Value("基号"))
    If Pub_JH>= CpColCount then Pub_JH = CpColCount
    If Pub_QS>= CpRowCount then Pub_QS = CpRowCount
    Pub_cS=Pub_QS
    '=================建表=================
    CpAna.AddField "期号",8
    CpAna.AddField "开奖号码",CpColCount*3




    For i = 1 to Pub_QS
    CpAna.AddField "前"&i&"比较形态",10
    Next
    CpAna.RowCount = CpData.RowCount
    CpAna.CreateTable()




    '==============算法主体============================
    ReDim XTs(CpColCount)

    For row = 0 to CpRowCount - 1
    CpAna.Cell( Row, "期号") = CpData.Seq(row)
    CpAna.Cell( Row, "开奖号码") = CpData.CodeStr(row)



    next

    '---------------------
    FOR i=Pub_QS to 1 step -1



    For row = 0 to CpRowCount - 1
    RowIndex = row - Pub_cS

    XT = ""
    IF Pub_JH=0 THEN
    For col =0 to CpColCount - 1



    OpenNum = CpData.Code(row, col)
    reOpenNum = CpData.Code(row - Pub_cS, col)
    If OpenNum < PreOpenNum then

    XT = XT + "1"
    ElseIf OpenNum = PreOpenNum then

    XT = XT + "0"
    Else

    XT = XT + "2"
    End If



    Next
    END IF



    IF Pub_JH>0 THEN


    OpenNum = CpData.Code(row, Pub_JH-1)
    reOpenNum = CpData.Code(row - Pub_cS, Pub_JH-1)

    If OpenNum < PreOpenNum then

    XT = XT + "1"
    ElseIf OpenNum = PreOpenNum then

    XT = XT + "0"
    Else

    XT = XT + "2"
    End If



    END IF



    if CpRowCount-1-row CpAna.Cell( RowIndex+Pub_cS,"前"&Pub_cS&"比较形态")=XT

    end if
    Next



    Pub_cS=Pub_cS-1



    NEXT



    End Function



    '----------说明--------------

    '基号处等于0分析全部7个开奖号,大于0的时候分析对应基号位置
    '从多次测试来看,影响意外出现的主要是分析范围内共多少期没及时更新引起
    '当出现意外的时候可以采取前期输入0,基号也是0,意外会消失


    _________________
    一流的条件 精彩的论坛
    avatar
    一品明灯
    Admin

    帖子数 : 292
    积分 : 720
    威望 : 4
    注册日期 : 10-03-02
    年龄 : 8

    普通 回复: [转帖]红宝石全能版二次开发代码专区

    帖子 由 一品明灯 于 2010-03-11, 14:29

    re:'===================...
    '==========================================================



    ' 前 期 分 析(增加“出几”统计)



    '==========================================================
    CpParam.Add "前期", 5,"{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}"
    CpParam.Add "重", "否","{是} {否}"
    CpParam.Add "前", 5,"{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}"
    Function Main
    '===============申明或定义变量=============
    CpRowCount = CpData.RowCount '开奖期数
    CpColCount = CpData.ColCount '开奖号码个数
    CpMaxCode = CpData.MaxCode '最大号码
    CpMinCode = CpData.MinCode '最小号码
    CpCodeCount = CpData.CodeCount '号码数量
    ub_QS = CInt(CpParam.Value("前期"))
    ub_qQ = CInt(CpParam.Value("前"))
    if ub_qQ<1 then Pub_qQ=1
    if ub_qQ>ub_QS then Pub_qQ=Pub_QS
    ub_CF =0
    if CpParam.Value( "重")="是" then Pub_CF =1
    '=================建表=================
    CpAna.AddField "前",3
    CpAna.AddField "期号",8
    CpAna.AddField "开奖号码",CpColCount*3
    For i = 1 to Pub_QS
    CpAna.AddField "前"&i,4
    Next
    For i = 0 to CpColCount
    CpAna.AddField "同"&i,3
    Next
    For i=0 to CpColCount
    CpAna.AddField i&"连出期数",5
    Next
    For i=0 to CpColCount
    CpAna.AddField i&"未出期数",5
    Next




    CpAna.RowCount = CpRowCount - Pub_QS
    CpAna.CreateTable()



    '==============算法主体============================
    Set CpSec = CreateObject("BoaoHbsActive.CpSec")
    CodeCount = 0'互不相同的开奖号码(为了在传统型彩票中不重复统计)
    ReDim Codes(CpColCount)'互不相同的开奖号码
    ReDim Tong(CpColCount+1)'同几
    ReDim Cont(Pub_QS-1)



    For row = Pub_QS to CpRowCount - 1
    row0 = row-Pub_QS
    CpAna.Cell(row0,"前")=CpRowCount - row0-1
    CpAna.Color(row0, "前") = CpColor.red
    CpAna.Cell(row0, "期号") = CpData.Seq(row)
    CpAna.Cell(row0, "开奖号码") = CpData.CodeStr(row)
    CodeCount = 0
    For i = 0 to CpColCount - 1
    b = True
    Tong(i) = 0
    code = CpData.Code(row,i)
    '检索是否有相同号码
    For j = 0 to CodeCount-1
    If code = Codes(j) Then
    b = False
    Exit For
    End If
    Next
    Tong(CpColCount) = 0
    If b Then'如果不相同则加入
    Codes(CodeCount) = code
    CodeCount = CodeCount + 1
    End If
    Next
    For i = 1 to Pub_QS
    Cont(i-1)= 0
    Next
    For col = 0 to CodeCount-1
    For i = 1 to Pub_QS
    reRow = row - i
    If (PreRow >= 0) Then
    CpSec.Clear()
    CpSec.Add "aa="&CpData.CodeStr(PreRow)
    If (CpSec.IsMember(0, Codes(col))) Then
    Cont(i-1) = Cont(i-1) + 1
    If Pub_CF =0 Then exit for
    End If
    End If
    Next
    Next
    For i = 1 to Pub_QS
    CpAna.Cell(row0, "前"&i) =Cont(i-1)
    if i =Pub_qQ Then CpAna.Color(row0, "前"&i) = CpColor.Blue
    Tong(Cont(i-1)) = Tong(Cont(i-1)) + 1
    Next
    For i = 0 to CpColCount
    CpAna.Cell(row0, "同"&(i)) = Tong(i)
    CpAna.Color(row0, "同"&(i)) = CpColor.Red
    Next




    For i1= 0 to CpColCount
    a=Cint(CpAna.Cell(row0, "前"&Pub_qQ))
    If a=i1 Then
    If row0>0 Then CpAna.Cell(row0, i1&"连出期数")=CpAna.Cell(row0-1, i1&"连出期数")+1
    If row0=0 Then CpAna.Cell(row0, i1&"连出期数")=1
    End If
    CpAna.Color(row0, i1&"连出期数") = CpColor.blue
    If a=i1 Then CpAna.Color(row0, i1&"连出期数") = CpColor.red
    If a<>i1 Then CpAna.Cell(row0, i1&"连出期数")=0
    Next
    For i3=0 to CpColCount
    If Cint(CpAna.Cell(row0, i3&"连出期数"))<>0 Then CpAna.Cell(row0,i3&"未出期数")=0
    If row0=0 and Cint(CpAna.Cell(row0, i3&"连出期数"))=0 Then CpAna.Cell(row0,i3&"未出期数")=1
    If row0>0 and Cint(CpAna.Cell(row0, i3&"连出期数"))=0 Then CpAna.Cell(row0,i3&"未出期数")= Cint(CpAna.Cell(row0-1,i3&"未出期数"))+1
    Next



    Next
    End Function




    ' 说明:
    ' 1:“前期”指 与前面多少期比较。
    ' 2:“重”:指是否重复计算重叠码
    ' 3:“前”:指 统计“前几”的出数情况,被选中的“前几”栏以蓝字显示。
    ' 可根据 “0连出期数”“1连出期数”……“n连出期数”和
    ' “0未出期数”“1未出期数”……“n未出期数”的规律性,来预测
    ' “前几”重叠码的个数。
    ' 4:详细用法:请到“建议、问题”区查看“请修改前期分析”的帖子
    ' 5:运行时请将以上说明剪切另存,避免出错。


    _________________
    一流的条件 精彩的论坛
    avatar
    一品明灯
    Admin

    帖子数 : 292
    积分 : 720
    威望 : 4
    注册日期 : 10-03-02
    年龄 : 8

    普通 回复: [转帖]红宝石全能版二次开发代码专区

    帖子 由 一品明灯 于 2010-03-11, 14:29

    re:'===================...
    '==========================================================
    ' 3D胆杀 2005-Aug-05
    '==========================================================
    Function Main
    '===========申明或定义变量=============
    CpRowCount = CpData.RowCount
    CpColCount = CpData.ColCount
    CpCodeCount = CpData.CodeCount
    ReDim Sha(CpCodeCount)
    ReDim Dan(CpCodeCount)
    ReDim DanCode(CpColCount)

    '=================建表=================
    CpAna.AddField "期号",8
    CpAna.AddField "开奖号码",CpColCount*3
    CpAna.AddField "-1",3
    CpAna.AddField "0",3
    CpAna.AddField "+1",3
    CpAna.AddField "胆出",4
    CpAna.AddField "-1出",4
    CpAna.AddField "0出",4
    CpAna.AddField "+1出",4
    CpAna.AddField "杀列表",CpCodeCount*2
    CpAna.AddField "杀出",4
    CpAna.RowCount = CpData.RowCount+1
    CpAna.CreateTable()

    '==============算法主体================
    For row = 0 to CpRowCount - 1
    CpAna.Cell(row, "期号") = CpData.Seq(row)
    CpAna.Cell(row, "开奖号码") = CpData.CodeStr(row)
    If row>0 Then
    For ii=0 to CpColCount-1
    CpAna.Cell(row,2+ii)=DanCode(ii)
    Next
    CpAna.Cell(row,"杀列表")=ShaXT

    '胆统计
    For ii=0 to CpColCount-1
    DanGS=0
    TempCode=DanCode(ii)
    For iii=0 to CpColCount-1
    If TempCode=CpData.Code(row,iii) Then
    CpAna.BkColor(row,2+ii)=CpColor.Red
    DanGS=DanGS+1
    End If
    Next
    CpAna.Cell(row,6+ii)=DanGS
    Next
    DanGS=0
    For ii=0 to CpColCount-1
    If CpAna.Cell(row,6+ii)<>0 Then
    DanGS=DanGS+CpAna.Cell(row,6+ii)
    End If
    Next
    CpAna.Cell(row,"胆出")=DanGS
    CpAna.Color(row,"胆出")=CpColor.IndexOf(DanGS)

    '杀统计
    ShaGS=0
    For ii=0 to CpColCount-1
    If Sha(CpData.Code(row,ii))=0 Then
    ShaGS=ShaGS+1
    End If
    Next
    CpAna.Cell(row,"杀出")=ShaGS
    CpAna.Color(row,"杀出")=CpColor.IndexOf(ShaGS)
    End If

    '杀列表
    For i=0 to CpCodeCount-1
    Dan(i)=0
    Sha(i)=0
    Next
    Sha(CpData.Code(row,0))=1
    Sha(CpData.Code(row,1))=1
    Sha(CpData.Code(row,2))=1
    Sha(Abs(CpData.Code(row,0)-CpData.Code(row,1)))=1
    Sha(Abs(CpData.Code(row,0)-CpData.Code(row,2)))=1
    Sha(Abs(CpData.Code(row,1)-CpData.Code(row,2)))=1
    TempCode=CpData.Code(row,0)+CpData.Code(row,1)
    If TempCode>9 Then
    TempCode=TempCode-10
    End If
    Sha(TempCode)=1
    TempCode=CpData.Code(row,0)+CpData.Code(row,2)
    If TempCode>9 Then
    TempCode=TempCode-10
    End If
    Sha(TempCode)=1
    TempCode=CpData.Code(row,1)+CpData.Code(row,2)
    If TempCode>9 Then
    TempCode=TempCode-10
    End If
    Sha(TempCode)=1
    ShaXT=""
    For i=0 to CpCodeCount-1
    If Sha(i)=0 Then
    ShaXT=ShaXT&i&" "
    End If
    Next

    '胆列表
    TempCode=CpData.Code(row,0)+CpData.Code(row,1)+CpData.Code(row,2)
    DanCode(0)=(TempCode-1) Mod 10
    DanCode(1)=TempCode Mod 10
    DanCode(2)=(TempCode+1) Mod 10
    Next
    CpAna.Cell(row,"期号")="下期"
    For ii=0 to CpColCount-1
    CpAna.Cell(row,2+ii)=DanCode(ii)
    CpAna.Color(row,2+ii)=CpColor.Fuchsia
    Next

    CpAna.Cell(row,"杀列表")=ShaXT
    CpAna.Color(row,"杀列表")=CpColor.Fuchsia
    End Function


    _________________
    一流的条件 精彩的论坛
    avatar
    一品明灯
    Admin

    帖子数 : 292
    积分 : 720
    威望 : 4
    注册日期 : 10-03-02
    年龄 : 8

    普通 回复: [转帖]红宝石全能版二次开发代码专区

    帖子 由 一品明灯 于 2010-03-11, 14:30

    re:'===================...
    '==========================================================
    ' 冷 热 排 序
    '==========================================================
    '说明:将每一期的前Pub_QS期号码统计中奖次数(不包扩当期),然后按冷热排序
    '==========================================================
    CpParam.Add "冷热期数",20,"{10}{15}{20}{25}{30}{35}"'用户设置参数
    Function Main
    '===============申明或定义变量=============
    CpRowCount = CpData.RowCount '开奖期数
    CpColCount = CpData.ColCount '开奖号码个数
    CpMaxCode = CpData.MaxCode '最大号码
    CpMinCode = CpData.MinCode '最小号码
    CpCodeCount = CpData.CodeCount '号码数量



    Pub_3Av = CpCodeCount / 3'三等分
    Pub_QS = CInt(CpParam.Value("冷热期数"))
    '=================建表=================
    CpAna.AddField "期号",8
    CpAna.AddField "开奖号码",20



    For i = 1 to CpCodeCount
    CpAna.AddField i,6
    Next



    CpAna.RowCount = CpRowCount+1
    CpAna.CreateTable()




    '==============算法主体============================
    ReDim sum(CpCodeCount)'在Pub_QS期内的开奖次数
    ReDim SortCodes(CpCodeCount)'根据sum排序后的开奖号码序列
    ReDim Codes(CpColCount)'开奖数据

    For row = 0 to CpRowCount
    '期号 开奖号码
    If (row < CpRowCount) Then
    CpAna.Cell(row, "期号") = CpData.Seq(row)
    CpAna.Cell(row, "开奖号码") = CpData.CodeStr(row)



    For col = 0 to CpColCount-1
    Codes(col) = CpData.Code(row,col)
    Next
    End If
    '排序
    Sort sum, SortCodes'根据开奖次数排序号码,SortCodes为排序好的号码序列



    For i = 0 to CpCodeCount-1
    CpAna.Cell(row, 2+i) = SortCodes(i)
    cl = CpColor.Blue'不冷不热
    If (i+1 < Pub_3Av) Then
    cl = CpColor.Green'冷
    ElseIf i > CpCodeCount - Pub_3Av Then
    cl = CpColor.Red'热
    End If



    If (row < CpRowCount) Then
    For col = 0 to CpColCount-1
    If Codes(col) = SortCodes(i) Then'本期中奖号码
    cl = CpColor.Fuchsia'本期号码
    Exit For
    End If
    Next
    End If



    CpAna.Color(row,2+i) = cl
    Next

    If row >= Pub_QS Then
    '减去前Pub_QS期的开奖次数
    For col = 0 to CpColCount - 1
    i = CpData.Code(row-Pub_QS, col)-CpMinCode
    sum(i) = sum(i) - 1
    Next
    End If

    For col = 0 to CpColCount - 1
    i = Codes(col)-CpMinCode
    sum(i) = sum(i) + 1
    Next
    Next
    End Function



    '==============辅助函数============================
    '根据开奖次数排序号码,Num为排序好的号码序列
    Function Sort(ByVal Sum(), ByRef Num())
    CpMaxCode = CpData.MaxCode
    CpMinCode = CpData.MinCode
    CpCodeCount = CpData.CodeCount'号码个数
    ReDim aa(CpCodeCount)
    For i = 0 to CpCodeCount-1
    n = -1
    Min = 99999
    For j = 0 to CpCodeCount-1
    If aa(j) <> -1 And Sum(j) < Min Then
    Min = Sum(j)
    n = j
    End If
    Next
    Num(i) = CpMinCode+n
    aa(n) = -1
    Next
    End Function


    _________________
    一流的条件 精彩的论坛
    avatar
    一品明灯
    Admin

    帖子数 : 292
    积分 : 720
    威望 : 4
    注册日期 : 10-03-02
    年龄 : 8

    普通 回复: [转帖]红宝石全能版二次开发代码专区

    帖子 由 一品明灯 于 2010-03-11, 14:30

    re:'===================...
    '==========================================================
    ' 尾差测蓝
    '==========================================================
    CpParam.Add "数", 1,"{1}{2}{3}{4}{5}{6}"
    CpParam.Add "变", 2,"{1}{2}{3}{4}{5}{6}"
    CpParam.Add "化", 3,"{1}{2}{3}{4}{5}{6}"
    Function Main
    CpRowCount = CpData.RowCount +1
    CpColCount = CpData.ColCount
    LS = CInt(CpParam.Value("数"))
    QS = CInt(CpParam.Value("变"))
    JD = CInt(CpParam.Value("化"))
    CpAna.AddField "期号",8
    CpAna.AddField"蓝号尾数",8
    CpAna.AddField"测中否",6
    CpAna.AddField"预测蓝号尾数",30
    CpAna.AddField"测尾个数",8
    CpAna.RowCount = CpRowCount
    CpAna.CreateTable()
    ReDim ycvs(9)
    For A = 0 to CpRowCount-2
    CpAna.Cell(A,"期号")=CpData.Seq(A)
    For B =0 to 9
    ycvs(B)=0
    Next
    For B =LS to CpColCount-1 step QS
    For P =B+1 to CpColCount-1 step JD
    vv=CpData.Code(A,B) mod 10
    sv=CpData.Code(A,p) mod 10
    vs=Abs(vv-sv)
    ycvs(vs)= ycvs(vs)+1
    Next
    Next
    lhvs=CpData.Code(A+1,CpColCount-1) mod 10
    ss=""
    zf=0
    gs=0
    For B =0 to 9
    if ycvs(B)>0 then
    ss=ss&B&" "
    gs=gs+1
    end if
    if ycvs(lhvs)>0 then zf=1
    Next
    CpAna.Cell(A,"蓝号尾数")=CpData.Code(A,CpColCount-1) mod 10
    CpAna.Color(A,"蓝号尾数") = CpColor.Blue
    if ACpAna.Cell(A+1,"预测蓝号尾数")=ss
    CpAna.Color(A+1,"预测蓝号尾数") = CpColor.red
    CpAna.Cell(A+1,"测尾个数")=gs
    Next
    CpAna.Cell(CpRowCount-1, "期号") ="下一期"
    End Function



    '说明:通过改变选择框中的数字,观察图形,可以杀掉部分蓝号。
    '例如:2,4,6组合时,双色球近28期只有05085和05089测中,086的01 11和090的03 13蓝号就可以杀掉
    '1,4,6组合时,双色球近28期只有5期测中,093的06 16和099的04 14蓝号就可以杀掉


    _________________
    一流的条件 精彩的论坛
    avatar
    一品明灯
    Admin

    帖子数 : 292
    积分 : 720
    威望 : 4
    注册日期 : 10-03-02
    年龄 : 8

    普通 回复: [转帖]红宝石全能版二次开发代码专区

    帖子 由 一品明灯 于 2010-03-11, 14:31

    re:'===================...
    '==========================================================
    ' 冷 热 次 数(改进)
    '==========================================================
    '说明:将每一期的前Pub_QS期号码统计中奖次数(不包括当期),然后按冷热排序
    '==========================================================
    CpParam.Add "冷热期数",20,"{10}{15}{20}{25}{30}{35}"'用户设置参数
    CpParam.Add "前几期", 3,"{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}"
    Function Main
    '===============申明或定义变量=============
    CpRowCount = CpData.RowCount '开奖期数
    CpColCount = CpData.ColCount '开奖号码个数
    CpMaxCode = CpData.MaxCode '最大号码
    CpMinCode = CpData.MinCode '最小号码
    CpCodeCount = CpData.CodeCount '号码数量



    Pub_QS = CInt(CpParam.Value("冷热期数"))
    Pub_Qq = CInt(CpParam.Value("前几期"))
    RLW= (Pub_QS * CpColCount)\CpCodeCount
    '=================建表=================
    CpAna.AddField "期号",8
    CpAna.AddField "开奖号码",CpColCount*3



    For i = 1 to CpCodeCount
    CpAna.AddField i,2
    Next
    For i = 1 to CpColCount
    CpAna.AddField "基"&i&"次数",7
    Next
    CpAna.AddField "次数合值",7
    CpAna.AddField "振幅" ,4



    For i = 1 to Pub_Qq
    CpAna.AddField "前"&i&"期相同次数",3
    Next



    CpAna.RowCount = CpRowCount+1
    CpAna.CreateTable()



    '==============算法主体============================
    ReDim sum(CpCodeCount)'在Pub_QS期内的开奖次数
    ReDim SortCodes(CpCodeCount)'根据sum排序后的开奖号码序列
    ReDim Codes(CpColCount)'开奖数据
    ReDim zjzs( CpRowCount,CpColCount)
    For row = 0 to CpRowCount
    '期号 开奖号码
    If (row < CpRowCount) Then
    CpAna.Cell(row, "期号") = CpData.Seq(row)
    CpAna.Cell(row, "开奖号码") = CpData.CodeStr(row)



    For col = 0 to CpColCount-1
    Codes(col) = CpData.Code(row,col)
    Next
    End If
    '排序
    Sort sum, SortCodes'根据开奖次数排序号码,SortCodes为排序好的号码序列

    zshz=0
    For i = 0 to CpCodeCount-1
    tl=""
    if len( SortCodes(i)) <2 then tl="0"
    CpAna.Cell(row, 2+i) =tl& SortCodes(i)
    cl = CpColor.Blue'不冷不热
    If i< lmgs Then
    cl = CpColor.Green'冷
    ElseIf i+1> wmgs+ lmgs Then
    cl = CpColor.Red'热
    End If
    tl=""
    If (row < CpRowCount) Then
    For col = 0 to CpColCount-1
    If Codes(col) = SortCodes(i) Then'本期中奖号码
    zjzs(row,col)=i+1
    zshz=zshz+i+1
    if i<9 then tl="0"
    CpAna.Cell(row, "基"&(col+1)&"次数") =tl&(i+1)
    Exit For
    End If
    Next
    End If
    If Codes(col) = SortCodes(i) Then '本期中奖号码
    CpAna.bkColor(row,2+i) = cl
    Else
    CpAna.Color(row,2+i) = cl
    End If
    Next
    If (row < CpRowCount) Then
    CpAna.Cell(row,"次数合值") =zshz
    CpAna.Color(row,"次数合值") =CpColor.Blue
    If (row < CpRowCount) Then CpAna.Cell(row,"振幅") =zshz-schz
    schz=zshz
    End If



    If row >= Pub_QS Then
    '减去前Pub_QS期的开奖次数
    For col = 0 to CpColCount - 1
    i = CpData.Code(row-Pub_QS, col)-CpMinCode
    sum(i) = sum(i) - 1
    Next
    End If

    For col = 0 to CpColCount - 1
    i = Codes(col)-CpMinCode
    sum(i) = sum(i) + 1
    Next




    wmgs=0
    lmgs=0
    For i = 0 to CpCodeCount-1
    if Sum(i)=RLW then wmgs=wmgs+1
    if Sum(i)Next



    '前期比较
    For i = 1 to Pub_Qq
    count =0
    If row>i-1and row < CpRowCount Then

    For col = 0 to CpColCount-1



    For j = 0 to CpColCount-1
    if zjzs(row,col)=zjzs(row-i,j) then
    count =count+1
    Exit For
    End iF
    Next

    Next

    CpAna.Cell(row, "前"&i&"期相同次数") =count
    CpAna.Color(row, "前"&i&"期相同次数") = CpColor.Red
    End iF
    Next



    Next
    End Function




    '==============辅助函数============================
    '根据开奖次数排序号码,Num为排序好的号码序列
    Function Sort(ByVal Sum(), ByRef Num())
    CpMaxCode = CpData.MaxCode
    CpMinCode = CpData.MinCode
    CpCodeCount = CpData.CodeCount'号码个数
    ReDim aa(CpCodeCount)



    For i = 0 to CpCodeCount-1
    n = -1
    Min = 99999
    For j = 0 to CpCodeCount-1

    If aa(j) <> -1 And Sum(j) < Min Then
    Min = Sum(j)
    n = j
    End If
    Next
    Num(i) = CpMinCode+n
    aa(n) = -1
    Next
    End Function

    '说明:
    '1:热、温、冷号码以不同的颜色表示
    '2:为方便导出再分析,号码补足两位
    '3:增加次数合值和变化幅度




    [发表时间:2010-2-18 18:34:00]


    _________________
    一流的条件 精彩的论坛
    avatar
    一品明灯
    Admin

    帖子数 : 292
    积分 : 720
    威望 : 4
    注册日期 : 10-03-02
    年龄 : 8

    普通 回复: [转帖]红宝石全能版二次开发代码专区

    帖子 由 一品明灯 于 2010-03-11, 14:31

    re:'===================...
    '==========================================================
    ' 中奖次数统计(更新替cyftt贴出)
    '==========================================================
    CpParam.Add "期数", 7,"{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}"
    CpParam.Add "小", 0,"{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}"
    CpParam.Add "大", 3,"{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}"
    Function Main

    '===============申明或定义变量=============
    CpRowCount = CpData.RowCount
    CpColCount = CpData.ColCount
    CpMinCode = CpData.MinCode
    CpMaxCode = CpData.MaxCode
    CpCodeCount = CpData.CodeCount'号码个数

    Pub_QS = CInt(CpParam.Value("期数"))
    Pub_XS = CInt(CpParam.Value("小"))
    Pub_DS = CInt(CpParam.Value("大"))

    If ub_XS > Pub_DS Then Pub_XS =0
    If ub_DS>ub_QS Then ub_DS =Pub_QS
    ' ub_DS =Pub_QS

    '=================建表=================
    CpAna.AddField "期号",8
    CpAna.AddField "开奖号码",20

    For i=Pub_XS to Pub_DS
    CpAna.AddField i&"次中奖个数",3
    Next
    CpAna.AddField ub_XS&"-"&Pub_DS& "次中奖个数",4
    CpAna.AddField "中奖段数",6
    For i=Pub_XS to Pub_DS
    CpAna.AddField i&"次个数",6
    CpAna.AddField ub_QS&"期内出现"&i& "次号码列表",50
    Next

    CpAna.RowCount=CpData.RowCount+1
    CpAna.CreateTable()


    '==============算法主体============================
    ReDim Sum(CpCodeCount)
    ReDim CSLB(Pub_QS)

    For row=0 to CpRowCount-1
    CpAna.Cell(row,"期号")=CpData.Seq(row)
    CpAna.Cell( row,"开奖号码")=CpData.CodeStr(row)

    If row >ub_QS-2 Then
    For i=0 to CpCodeCount-1
    Sum(i)=0
    Next

    For i=0 to Pub_QS-1
    For col=0 to CpColCount-1
    m=CpData.Code(row-i,col)-CpMinCode
    Sum(m)=Sum(m)+1
    Next
    Next
    For i=0 to Pub_QS
    CSLB(i)=""
    Next


    For i=0 to CpCodeCount-1
    ii=Sum(i)
    tl=""
    If i<9 Then tl="0"
    CSLB(ii)=CSLB(ii)&tl&(i+CpMinCode)&" "
    Next
    zjsum=0
    gssum=0
    For i=Pub_XS to Pub_DS
    iii=0
    For kk=0 to CpColCount-1
    aa=CpData.Code(row+1,kk)
    if aa<10 then aa="0"&aa
    if InStr(CSLB(i),aa)>0 then iii=iii+1
    next
    gssum=gssum+iii
    if iii>0 then zjsum=zjsum+1
    if row CpAna.Cell( row+1,i&"次个数")=LEN(CSLB(i))/3
    CpAna.Cell( row+1,Pub_QS&"期内出现"&i& "次号码列表")=CSLB(i)
    Next
    if row if row if rowif row
    end if
    Next
    End Function


    _________________
    一流的条件 精彩的论坛
    avatar
    一品明灯
    Admin

    帖子数 : 292
    积分 : 720
    威望 : 4
    注册日期 : 10-03-02
    年龄 : 8

    普通 回复: [转帖]红宝石全能版二次开发代码专区

    帖子 由 一品明灯 于 2010-03-11, 14:32

    re:'===================...
    '==========================================================
    ' 中奖次数统计(更新替cyftt贴出)
    '==========================================================
    CpParam.Add "期数", 7,"{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}"
    CpParam.Add "小", 0,"{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}"
    CpParam.Add "大", 3,"{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}"
    Function Main

    '===============申明或定义变量=============
    CpRowCount = CpData.RowCount
    CpColCount = CpData.ColCount
    CpMinCode = CpData.MinCode
    CpMaxCode = CpData.MaxCode
    CpCodeCount = CpData.CodeCount'号码个数

    Pub_QS = CInt(CpParam.Value("期数"))
    Pub_XS = CInt(CpParam.Value("小"))
    Pub_DS = CInt(CpParam.Value("大"))

    If ub_XS > Pub_DS Then Pub_XS =0
    If ub_DS>ub_QS Then ub_DS =Pub_QS
    ' ub_DS =Pub_QS

    '=================建表=================
    CpAna.AddField "期号",8
    CpAna.AddField "开奖号码",20

    For i=Pub_XS to Pub_DS
    CpAna.AddField i&"次中奖个数",3
    Next
    CpAna.AddField ub_XS&"-"&Pub_DS& "次中奖个数",4
    CpAna.AddField "中奖段数",6
    For i=Pub_XS to Pub_DS
    CpAna.AddField i&"次个数",6
    CpAna.AddField ub_QS&"期内出现"&i& "次号码列表",50
    Next

    CpAna.RowCount=CpData.RowCount+1
    CpAna.CreateTable()


    '==============算法主体============================
    ReDim Sum(CpCodeCount)
    ReDim CSLB(Pub_QS)

    For row=0 to CpRowCount-1
    CpAna.Cell(row,"期号")=CpData.Seq(row)
    CpAna.Cell( row,"开奖号码")=CpData.CodeStr(row)

    If row >ub_QS-2 Then
    For i=0 to CpCodeCount-1
    Sum(i)=0
    Next

    For i=0 to Pub_QS-1
    For col=0 to CpColCount-1
    m=CpData.Code(row-i,col)-CpMinCode
    Sum(m)=Sum(m)+1
    Next
    Next
    For i=0 to Pub_QS
    CSLB(i)=""
    Next


    For i=0 to CpCodeCount-1
    ii=Sum(i)
    tl=""
    If i<9 Then tl="0"
    CSLB(ii)=CSLB(ii)&tl&(i+CpMinCode)&" "
    Next
    zjsum=0
    gssum=0
    For i=Pub_XS to Pub_DS
    iii=0
    For kk=0 to CpColCount-1
    aa=CpData.Code(row+1,kk)
    if aa<10 then aa="0"&aa
    if InStr(CSLB(i),aa)>0 then iii=iii+1
    next
    gssum=gssum+iii
    if iii>0 then zjsum=zjsum+1
    if row CpAna.Cell( row+1,i&"次个数")=LEN(CSLB(i))/3
    CpAna.Cell( row+1,Pub_QS&"期内出现"&i& "次号码列表")=CSLB(i)
    Next
    if row if row if rowif row
    end if
    Next
    End Function


    _________________
    一流的条件 精彩的论坛
    avatar
    一品明灯
    Admin

    帖子数 : 292
    积分 : 720
    威望 : 4
    注册日期 : 10-03-02
    年龄 : 8

    普通 回复: [转帖]红宝石全能版二次开发代码专区

    帖子 由 一品明灯 于 2010-03-11, 14:32

    re:'===================...
    '==========================================================
    ' 热温冷统计
    '==========================================================

    CpParam.Add "冷热期数", 7,"{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}"
    CpParam.Add "热码:≥", 3,"{1}{2}{3}{4}{5}{6}"
    CpParam.Add "温码:=", 2,"{1}{2}{3}{4}{5}"
    CpParam.Add "冷码:≤", 1,"{1}{2}{3}{4}"
    Function Main
    '===============申明或定义变量=============
    CpRowCount = CpData.RowCount
    CpColCount = CpData.ColCount
    CpMinCode = CpData.MinCode
    CpMaxCode = CpData.MaxCode
    CpCodeCount = CpData.CodeCount'号码个数

    Pub_QS = CInt(CpParam.Value("冷热期数"))
    Pub_Rm = CInt(CpParam.Value("热码:≥"))
    Pub_Wm = CInt(CpParam.Value("温码:="))
    Pub_Lm = CInt(CpParam.Value("冷码:≤"))

    '=================建表=================
    CpAna.AddField "期号",8
    CpAna.AddField "开奖号码",CpColCount*3

    CpAna.AddField "热温冷中奖形态",14
    CpAna.AddField "热码中奖",8
    CpAna.AddField "温码中奖",8
    CpAna.AddField "冷码中奖",8

    CpAna.AddField "中奖热码列表",22
    CpAna.AddField "中奖温码列表",22
    CpAna.AddField "中奖冷码列表",22

    CpAna.AddField "热温冷形态",10
    CpAna.AddField "热码",4
    CpAna.AddField "温码",4
    CpAna.AddField "冷码",4

    CpAna.AddField "热码列表",70
    CpAna.AddField "温码列表",70
    CpAna.AddField "冷码列表",70

    CpAna.RowCount = CpRowCount
    CpAna.CreateTable()

    '==============算法主体============================
    ReDim sum(CpCodeCount)'各号码中奖的次数

    F1RmLB="" '初始化前1期热码列表
    F1WmLB=""
    F1LmLB=""

    For row = 0 to CpRowCount-1
    CpAna.Cell(row, "期号") = CpData.Seq(row)
    CpAna.Cell(row, "开奖号码") = CpData.CodeStr(row)

    For i= 0 to CpCodeCount
    sum(i)=0
    Next

    ZjRmGS=0
    ZjWmGS=0
    ZjLmGS=0
    ZjRmLB=" "
    ZjWmLB=" "
    ZjLmLB=" "

    RmGS=0
    WmGS=0
    LmGS=0
    RmLB=""
    WmLB=""
    LmLB=""

    If row > Pub_QS - 2 Then
    For j = 0 to Pub_QS - 1
    For col = 0 to CpColCount - 1
    If CpData.Code(row - j, col) - CpMinCode >= 0 AND CpMaxCode - CpData.Code(row - j, col) >=0 Then
    i = CpData.Code(row - j, col) - CpMinCode
    sum(i) = sum(i) + 1
    End If
    Next
    Next

    For i=0 to CpCodeCount - 1
    If sum(i) >= Pub_Rm Then
    RmGS=RmGS + 1
    RmLB=RmLB & i+1 & " "
    Else
    If sum(i) = Pub_Wm Then
    WmGS=WmGS+1
    WmLB=WmLB & i+1 & " "
    End If
    If sum(i) <= Pub_Lm Then
    LmGS=LmGS+1
    LmLB=LmLB & i+1 & " "
    End If
    End If
    Next

    For col=0 to CpColCount - 1
    If InStr(F1RmLB," " & CpData.Code(row, col) & " ") > 0 Then
    ZjRmLB=ZjRmLB & CpData.Code(row, col) & " "
    ZjRmGS=ZjRmGS+1
    Else
    If InStr(F1WmLB," " & CpData.Code(row, col) & " ") > 0 Then
    ZjWmLB=ZjWmLB & CpData.Code(row, col) & " "
    ZjWmGS=ZjWmGS+1
    End If
    If InStr(F1LmLB," " & CpData.Code(row, col) & " ") > 0 Then
    ZjLmLB=ZjLmLB & CpData.Code(row, col) & " "
    ZjLmGS=ZjLmGS+1
    End If
    End If
    Next

    ZjXT=ZjRmGS & ZjWmGS & ZjLmGS

    F1RmLB= " " & RmLB
    F1WmLB= " " & WmLB
    F1LmLB= " " & LmLB

    CpAna.Cell(row, "热温冷中奖形态") =ZjXT
    CpAna.Cell(row, "热码中奖") =ZjRmGS
    CpAna.Cell(row, "温码中奖") =ZjWmGS
    CpAna.Cell(row, "冷码中奖") =ZjLmGS
    CpAna.Cell(row, "中奖热码列表") =ZjRmLB
    CpAna.Cell(row, "中奖温码列表") =ZjWmLB
    CpAna.Cell(row, "中奖冷码列表") =ZjLmLB

    CpAna.Cell(row, "热温冷形态") =RmGS & " "& WmGS & " "& LmGS
    CpAna.Cell(row, "热码") =RmGS
    CpAna.Cell(row, "温码") =WmGS
    CpAna.Cell(row, "冷码") =LmGS
    CpAna.Cell(row, "热码列表") =RmLB
    CpAna.Cell(row, "温码列表") =WmLB
    CpAna.Cell(row, "冷码列表") =LmLB


    End If

    Next

    End Function


    _________________
    一流的条件 精彩的论坛
    avatar
    一品明灯
    Admin

    帖子数 : 292
    积分 : 720
    威望 : 4
    注册日期 : 10-03-02
    年龄 : 8

    普通 回复: [转帖]红宝石全能版二次开发代码专区

    帖子 由 一品明灯 于 2010-03-11, 14:32

    re:'===================...
    '==========================================================
    ' 号 码 走势
    '==========================================================

    Function Main
    '===============申明或定义变量=============
    CpRowCount = CpData.RowCount
    CpColCount = CpData.ColCount
    CpMinCode = CpData.MinCode
    CpMaxCode = CpData.MaxCode

    '=================建表=================
    CpAna.AddField "期号",8
    For code = CpMinCode to CpMaxCode
    If code < 10 Then
    CpAna.AddField "0" & code,2
    Else
    CpAna.AddField code,2'所有号码
    End If
    Next

    CpAna.RowCount = CpRowCount
    CpAna.CreateTable()

    '==============算法主体============================
    ReDim HamaFlag(CpMaxCode)

    For row = 0 to CpRowCount - 1
    For i= 0 to CpMaxCode - 1
    HamaFlag(i)=0
    Next

    CpAna.Cell(row, "期号") = CpData.Seq(row)

    For col = 0 to CpColCount - 1
    i=CpData.Code(row,col)
    If i - CpMinCode >=0 AND CpMaxCode - i >=0 Then
    HamaFlag(i-1)=1
    End If
    Next

    For i=0 to CpMaxCode-1
    If HamaFlag(i)=1 Then
    If i < 9 Then
    CpAna.Cell(row, i+1) = "0" & i+1
    Else
    CpAna.Cell(row, i+1) = i+1
    End If
    End If
    Next
    Next
    End Function


    _________________
    一流的条件 精彩的论坛
    avatar
    一品明灯
    Admin

    帖子数 : 292
    积分 : 720
    威望 : 4
    注册日期 : 10-03-02
    年龄 : 8

    普通 回复: [转帖]红宝石全能版二次开发代码专区

    帖子 由 一品明灯 于 2010-03-11, 14:33

    re:精滤 3D 组三或组六过滤'==...
    精滤 3D 组三或组六过滤

    '=================================================
    ' 组形式过滤
    '=================================================



    CpFlt.Add "组形式"




    Function Main()
    Pub_FltRow = CpFlt.RowCount
    Pub_CodeCount = CpFlt.CodeCount
    CpMaxCode = CpData.MaxCode '最大号码
    CpMinCode = CpData.MinCode '最小号码

    For row = 0 to Pub_FltRow-1
    cnt1 = 0 '二次限定
    Cnt=0



    Sum=0
    For i=0 to Pub_CodeCount-1
    Code1=CpFlt.Code(Row,i)
    For Col=0 to Pub_CodeCount-1
    Code=CpFlt.Code(Row,Col)
    If InStr(Code,Code1) then Sum=Sum+1
    Next
    Next

    IF Sum>3 then Cnt=3
    If Sum=3 then Cnt=6



    For k = 0 to CpFlt.ConditionCount-1
    If CpFlt.Checked(k,"组形式",cnt) Then
    cnt1 = cnt1+1
    End If
    Next



    If CpFlt.LimitChecked(cnt1) then
    else
    CpFlt.Filter(row)
    End if
    Next
    End Function




    '如出组三,条件为3



    '如出组六,条件为6


    _________________
    一流的条件 精彩的论坛
    avatar
    一品明灯
    Admin

    帖子数 : 292
    积分 : 720
    威望 : 4
    注册日期 : 10-03-02
    年龄 : 8

    普通 回复: [转帖]红宝石全能版二次开发代码专区

    帖子 由 一品明灯 于 2010-03-11, 14:33

    re:'===================...
    '==========================================================
    ' 五 期 选 号
    '==========================================================
    CpParam.Add "参考期数" ,2,"{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11}{12}{13}{14}{15}{16}{17}{18}{19}{20}"
    CpParam.Add "生成期数" ,1,"{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11}{12}{13}{14}{15}{16}{17}{18}{19}{20}"



    Function Main
    '===============申明或定义变量=============
    CpRowCount = CpData.RowCount
    CpColCount = CpData.ColCount
    CpMinCode = CpData.MinCode
    CpMaxCode = CpData.MaxCode
    CpCodeCount = CpData.CodeCount '号码个数

    Pub_QS = CInt(CpParam.Value("参考期数"))
    Pub_SC = CInt(CpParam.Value("生成期数"))




    '=================建表=================
    CpAna.AddField "期号",8
    CpAna.AddField "开奖号码",CpColCount*3




    CpAna.AddField "旧新比",4
    CpAna.AddField "旧号个数",4
    CpAna.AddField "旧中数",4
    CpAna.AddField "旧号",80
    CpAna.AddField "新号个数",4
    CpAna.AddField "新中数",4
    CpAna.AddField "新号",80



    CpAna.AddField "翻数比",6
    CpAna.AddField "首翻个数",4
    CpAna.AddField "首中数",4
    CpAna.AddField "首翻数",20



    CpAna.AddField "次翻个数",4
    CpAna.AddField "次中数",4
    CpAna.AddField "次翻数",20

    CpAna.AddField "再翻个数",4
    CpAna.AddField "再中数",4
    CpAna.AddField "再翻数",20

    CpAna.RowCount = CpRowCount+1
    CpAna.CreateTable()



    '==============算法主体============================

    OldCpDataCount=Pub_QS*CpColCount
    ReDim OldCode(OldCpDataCount) '在前n期出现过的号
    ReDim OldCodes(CpMaxCode)
    ReDim NewCodes(CpMaxCode) '在前n期没有出现过的号

    For row = 0 to CpRowCount-1

    If row=CpRowCount-1 Then
    CpAna.Cell(row+1, "期号") ="下一期"
    End If
    CpAna.Cell(row, "期号") = CpData.Seq(row)
    CpAna.Cell(row, "开奖号码") = CpData.CodeStr(row)

    '取旧号 放入一个数组中
    Codes=""
    iCount=0
    For i=Row-Pub_QS+1 to Row
    For Col=0 to CpColCount -1
    OldCode(iCount)=CpData.Code(i,Col)
    iCount=iCount+1
    Next
    Next
    '=====去掉多余的号
    iOldCount=0
    iNewCount=0
    NewCode=""
    For K=CpMinCode to CpMaxCode
    Sum=0
    For m=0 to OldCpDataCount
    IF K=OldCode(m) Then
    Sum=Sum+1
    If Sum=1 Then '旧号
    IF K<10 Then
    Codes=Codes&"0"&k&" "
    Else
    Codes=Codes&k&" "
    End IF
    OldCodes(iOldCount)=k '将去除重复的号存入数组中
    iOldCount= iOldCount+1
    End IF
    End If
    Next
    Next



    CpAna.Cell(Row+1,"旧号个数")=iOldCount
    CpAna.Cell(Row+1,"旧号")=Codes



    '新号
    Sum=0
    For K=CpMinCode to CpMaxCode
    For m=0 to CpMaxCode
    IF K=OldCodes(m) And OldCodes(m)>0 Then
    sum=sum+1
    End IF
    Next
    If Sum=0 Then
    IF K<10 Then
    NewCode=NewCode&"0"&k&" "
    Else
    NewCode=NewCode&k&" "
    End IF
    NewCodes(iNewCount)=k
    iNewCount=iNewCount+1
    End if
    Sum=0
    Next
    CpAna.Cell(Row+1,"新号个数")=iNewCount
    CpAna.Cell(Row+1,"新号")=NewCode




    '**数
    CurCode=""
    CodeTF=""
    CurCodes=""
    SecCodes=""
    SecCodeTF=""
    ThreeCodes=""
    ThreeCodeTF=""
    iCount=0
    iSecCount=0
    iThreeCount=0
    For Col=0 to CpColCount-1
    CurCode=CpData.Code(Row-Pub_QS+1,Col)
    If CurCode<10 Then
    CurCode="0"&CurCode
    End IF
    Sum=0
    For m=Row-Pub_QS+2 To Row
    CurCodes=CpData.Codestr(m)
    If InStr(CurCodes,CurCode)>0 Then
    Sum=Sum+1
    End IF
    Next
    If Sum=0 then
    CodeTF=CodeTF&CurCode&" "
    iCount=iCount+1
    End IF

    '次翻数

    CurCode=CpData.Code(Row-Pub_QS+2,Col)
    If CurCode<10 Then
    CurCode="0"&CurCode
    End IF
    SecSum=0
    For m=Row-Pub_QS+3 To Row
    SecCodes=CpData.Codestr(m)
    If InStr(SecCodes,CurCode)>0 Then
    SecSum=SecSum+1
    End IF
    Next
    If SecSum=0 then
    SecCodeTF=SecCodeTF&CurCode&" "
    iSecCount=iSecCount+1
    End IF



    '再翻数

    CurCode=CpData.Code(Row-Pub_QS+3,Col)
    If CurCode<10 Then
    CurCode="0"&CurCode
    End IF
    ThreeSum=0
    For m=Row-Pub_QS+4 To Row
    ThreeCodes=CpData.Codestr(m)
    If InStr(ThreeCodes,CurCode)>0 Then
    ThreeSum=SecSum+1
    End IF
    Next
    If ThreeSum=0 then
    ThreeCodeTF=ThreeCodeTF&CurCode&" "
    iThreeCount=iThreeCount+1
    End IF




    Next
    CpAna.Cell(Row+1,"首翻数")=CodeTF
    CpAna.Cell(Row+1,"首翻个数")=iCount
    CpAna.Cell(Row+1,"次翻数")=SecCodeTF
    CpAna.Cell(Row+1,"次翻个数")=iSecCount
    CpAna.Cell(Row+1,"再翻数")=ThreeCodeTF
    CpAna.Cell(Row+1,"再翻个数")=iThreeCount




    '统计中奖个数
    iOldZJ=0
    iNewZJ=0
    iTFZJ=0
    iSecTFZJ=0
    iThreeTFZJ=0
    CurCode=""

    For Col=0 to CpColCount-1
    CurCode=CpData.Code(Row,Col)
    If CurCode<10 Then
    CurCode="0" & CurCode
    End If

    if InStr(CpAna.Cell(Row,"旧号"),CurCode)>0 then
    iOldZJ=iOldZJ+1
    end if

    if InStr(CpAna.Cell(Row,"新号"),CurCode)>0 then
    iNewZJ=iNewZJ+1
    end if

    if InStr(CpAna.Cell(Row,"首翻数"),CurCode)>0 then
    iTFZJ=iTFZJ+1
    end if



    if InStr(CpAna.Cell(Row,"次翻数"),CurCode)>0 then
    iSecTFZJ=iSecTFZJ+1
    end if



    if InStr(CpAna.Cell(Row,"再翻数"),CurCode)>0 then
    iThreeTFZJ=iThreeTFZJ+1
    end if
    Next

    CpAna.Cell(Row,"旧中数")=iOldZJ
    CpAna.Cell(Row,"新中数")=iNewZJ
    CpAna.Cell(Row,"首中数")=iTFZJ
    CpAna.Cell(Row,"次中数")=iSecTFZJ
    CpAna.Cell(Row,"再中数")=iThreeTFZJ
    CpAna.Cell(Row,"旧新比")=iOldZJ&":"&iNewZJ
    CpAna.Cell(Row,"翻数比")=iTFZJ&":"&iSecTFZJ&":"&iThreeTFZJ




    Next




    '以下是为了方便做成过江条件,需要在c:盘创建一个文本文件testfile.txt,如果大家不需要,可以把下面这些代码删除



    Set fs = CreateObject("scripting.FileSystemObject")
    Set a = fs.CreateTextFile("c:\testfile.txt", True)
    a.WriteLine("旧号:"&CpAna.Cell(CpRowCount-Pub_SC,"旧号"))
    a.WriteLine("新号:"&CpAna.Cell(CpRowCount-Pub_SC,"新号"))
    a.WriteLine("首翻数:"&CpAna.Cell(CpRowCount-Pub_SC,"首翻数"))
    a.WriteLine("次翻数:"&CpAna.Cell(CpRowCount-Pub_SC,"次翻数"))
    a.WriteLine("再翻数:"&CpAna.Cell(CpRowCount-Pub_SC,"再翻数"))
    a.WriteLine("2-5="&CpAna.Cell(CpRowCount-Pub_SC,"旧号")&",")
    a.WriteLine("1-4="&CpAna.Cell(CpRowCount-Pub_SC,"新号")&",")
    a.WriteLine("0-1="&CpAna.Cell(CpRowCount-Pub_SC,"首翻数")&",")
    a.WriteLine("0-1="&CpAna.Cell(CpRowCount-Pub_SC,"次翻数")&",")
    a.WriteLine("0-1="&CpAna.Cell(CpRowCount-Pub_SC,"再翻数"))
    a.Close




    End Function





    '修正新号个数均为的情况



    '修正列宽


    _________________
    一流的条件 精彩的论坛
    avatar
    一品明灯
    Admin

    帖子数 : 292
    积分 : 720
    威望 : 4
    注册日期 : 10-03-02
    年龄 : 8

    普通 回复: [转帖]红宝石全能版二次开发代码专区

    帖子 由 一品明灯 于 2010-03-11, 14:34

    re:'===================...
    '==========================================================
    ' 钟摆原理测大小
    '==========================================================
    CpParam.Add "第几栏", 8, "{5}{6}{7}{8}{9}{10}{11}{12}{13}{14}{15}{16}{17}{18}{19}{20}"
    CpParam.Add "幅度","0,3","{0,3}{-2,3}{-6,6}"
    Function Main
    '===============申明或定义变量=============

    CpRowCount = CpData.RowCount '开奖期数
    CpColCount = CpData.ColCount '开奖号码个数
    CpMaxCode = CpData.MaxCode '最大号码
    CpMinCode = CpData.MinCode '最小号码
    CpCodeCount = CpData.CodeCount '号码数量



    J_L=CInt(CpParam.Value("第几栏"))-1
    If J_L If J_L>1+3*CpColCount Then J_L=1+3*CpColCount
    Strqs=CpParam.Value( "幅度")
    a=InStr(Strqs,",")+InStr(Strqs," ")
    F_D1=cint(Left(Strqs,a-1))
    F_D2=cint(Mid(Strqs,a+1))



    '=================建表=================
    CpAna.AddField "期号",8

    For i = 1 to CpColCount
    CpAna.AddField "位"& i,3
    Next
    For i = 1 to CpColCount
    CpAna.AddField "位"&i& "差值",3
    Next
    CpAna.AddField "位差之和",8



    For i = 1 to CpColCount-1
    CpAna.AddField "前"&i+1&"后"&i& "差值",3
    Next
    CpAna.AddField "差值之和",8



    For i= F_D1 to F_D2
    CpAna.AddField i&"连出期数",5
    Next
    For i= F_D1 to F_D2
    CpAna.AddField i&"未出期数",5
    Next
    Pub_VS=0
    sas=int(CpRowCount/2)



    CpAna.RowCount =sas
    CpAna.CreateTable()
    '==============算法主体============================
    ReDim WZ(CpColCount-1)
    ReDim BC(CpColCount-1)



    asa=(CpRowCount) mod 2



    For row =asa to CpRowCount-1 step 2
    ss=(row-asa)/2
    CpAna.Cell(ss, "期号") =CpData.Seq(row)

    For i = 0 to CpColCount-1
    WZ(i) =CpData.Code(row,i)
    Next
    For i =1 to CpColCount-1
    For j =1+i to CpColCount
    If WZ(i-1)>WZ( j-1) Then
    t=WZ(i-1)
    WZ(i-1)=WZ( j-1)
    WZ( j-1)=t
    End If
    Next
    Next



    For i = 1 to CpColCount
    CpAna.Cell(ss, "位"& i) = WZ(i-1)
    Next
    c=0
    d=0
    For i =0 to CpColCount-1
    If ss>0 Then
    b=-1
    If WZ(i)-BC(i) >0 Then b=1
    If WZ(i)-BC(i)=0 Then b=0
    CpAna.Cell(ss,"位"&i+1& "差值") =b
    CpAna.Color(ss,"位"&i+1& "差值")= CpColor.blue
    If i >0 Then
    b1=-1
    If BC(i)- WZ(i-1) >0 Then b1=1
    If BC(i)- WZ(i-1)=0 Then b1=0
    CpAna.Cell(ss,"前"&i+1&"后"&i& "差值") =b1
    d=d+b1
    End If
    c=c+b
    End If
    BC(i)= WZ(i)
    Next
    If row >asa Then
    CpAna.Cell(ss, "位差之和") =c
    CpAna.Color(ss, "位差之和") = CpColor.Red
    CpAna.Cell(ss, "差值之和") =d
    CpAna.Color(ss, "差值之和") = CpColor.Red
    End If
    Next



    For row =asa+2 to CpRowCount-1 step 2
    row0=(row-asa)/2
    CpAna.bkColor(row0,int(J_L))=CpColor.Yellow
    For i1=F_D1 to F_D2
    a=Cint(CpAna.Cell(row0,int(J_L)))
    If row0=1 and a<>i1 Then CpAna.Cell(row0, i1&"连出期数")=0
    If row0=1 and a=i1 Then CpAna.Cell(row0, i1&"连出期数")=1
    If a=i1 and row0>1 Then
    aq=CpAna.Cell(row0-1, i1&"连出期数")
    CpAna.Cell(row0, i1&"连出期数")=aq+1
    End If
    CpAna.Color(row0, i1&"连出期数") = CpColor.blue
    If a=i1 Then CpAna.Color(row0, i1&"连出期数") = CpColor.red
    If a<>i1 Then CpAna.Cell(row0, i1&"连出期数")=0
    Next
    For i3=F_D1 to F_D2
    a4=Cint(CpAna.Cell(row0, i3&"连出期数"))
    If a4<>0 Then CpAna.Cell(row0,i3&"未出期数")=0
    If a4<>0 Then CpAna.Color(row0,i3&"未出期数") = CpColor.red
    If row0=1 and a4=0 Then CpAna.Cell(row0,i3&"未出期数")=1
    If row0>1 and a4=0 Then
    aw=CpAna.Cell(row0-1,i3&"未出期数")
    CpAna.Cell(row0,i3&"未出期数")=aw+1
    End If
    Next
    Next

    End Function



    ' 说明:“cpmtl”的帖子
    ' “3D钟摆原理隔期定大势,杀号法”编写。



    ' 1:号码从小到大排列,间隔一期比较大小。比较结果
    ' “大于,等于,小于”分别用“1,0,-1”表示。



    ' 2:"第几栏"指 对第几栏进行"连出期数"和"未出期数"的分析,
    ' 分析的栏目所在的列着黄色。



    ' 3: "幅度"指 第几栏的变化大小,输入时小数在前,大数在后。



    ' 4: "位1差值","位2差值",……,"位n差值" 指后一期的号码
    '  减去前一期相同位置上的号码所得的值。



    ' 5: "前2后1差值",……,"前n+1后n差值" 指前一期n+1位置上
    ' 的号码减去后一期n位置上的号码所得的值。



    ' 6: 运行时请将以上说明剪切另存,避免出错。


    _________________
    一流的条件 精彩的论坛
    avatar
    一品明灯
    Admin

    帖子数 : 292
    积分 : 720
    威望 : 4
    注册日期 : 10-03-02
    年龄 : 8

    普通 回复: [转帖]红宝石全能版二次开发代码专区

    帖子 由 一品明灯 于 2010-03-11, 14:34

    re:'===================...
    '==========================================================
    ' 间 隔 走 势
    '==========================================================
    CpParam.Add "间隔", 0,"{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}"



    Function Main()
    '===============申明或定义变量=============
    CpRowCount = CpData.RowCount
    CpColCount = CpData.ColCount
    CpMinCode = CpData.MinCode
    CpMaxCode = CpData.MaxCode
    a= CInt(CpParam.Value("间隔"))+1



    '=================建表=================
    CpAna.AddField "期号", 8
    For Code = CpMinCode To CpMaxCode
    If Code < 10 Then
    CpAna.AddField "0" & Code, 2
    Else
    CpAna.AddField Code, 2 '所有号码
    End If
    Next




    CpAna.RowCount = CpRowCount\a+2
    CpAna.CreateTable()



    '==============算法主体============================

    ReDim JianGe(CpMaxCode)'存间隔开奖号



    row0=0



    For row = 0 to CpRowCount -1 step a



    For i = 0 To CpMaxCode - 1
    JianGe(i) = 0
    Next
    CpAna.Cell(row0, "期号") = CpData.Seq(row)

    For col = 0 To CpColCount - 1
    i = CpData.Code(row, col)
    If i - CpMinCode >= 0 And CpMaxCode - i >= 0 Then
    JianGe(i - 1) = 1
    End If
    Next



    For i = 0 To CpMaxCode - 1
    If JianGe(i) = 1 Then
    If i < 9 Then
    CpAna.Cell(row0, i + 1) = "0" & i + 1
    Else
    CpAna.Cell(row0, i + 1) = i + 1
    End If
    End If



    Next



    row0=row0+1



    Next



    End Function




    '-----说明------------------
    '只是把“号 码 走 势”加以修改,默认间隔0,全部走势;



    '常有利用间隔期数分析走势,顺手更改的;



    '间隔1表示从开奖第一期取间隔1的期"1,3,5..."的期数;



    '同理间隔3表示从开奖第一期取间隔1的期"1,5,9..."的期数;



    '充分利用分析范围前面的期数(即从哪期开始)可以有效更改走势


    _________________
    一流的条件 精彩的论坛
    avatar
    一品明灯
    Admin

    帖子数 : 292
    积分 : 720
    威望 : 4
    注册日期 : 10-03-02
    年龄 : 8

    普通 回复: [转帖]红宝石全能版二次开发代码专区

    帖子 由 一品明灯 于 2010-03-11, 14:34

    re:'===================...
    '=================================================
    ' 跨度过滤
    '=================================================



    CpFlt.Add "跨度"



    Function Main()
    Pub_CodeCount = CpFlt.CodeCount
    For i = 0 to CpFlt.RowCount-1
    cnt = 0'跨度
    cnt1 = 0'二次限定

    MinCode=99999
    MaxCode=-99999

    For Col=0 to Pub_CodeCount-1
    Code=CpFlt.Code(i,Col)

    IF Code>MaxCode Then
    MaxCode=Code
    End IF

    IF Code MinCode=Code
    End IF
    Next

    cnt=MaxCode-MinCode




    For k = 0 to CpFlt.ConditionCount-1
    If CpFlt.Checked(k,"跨度",cnt) Then
    cnt1 = cnt1+1
    End If
    Next



    If CpFlt.LimitChecked(cnt1) then
    else
    CpFlt.Filter(i)
    End if

    Next

    End Function


    _________________
    一流的条件 精彩的论坛
    avatar
    一品明灯
    Admin

    帖子数 : 292
    积分 : 720
    威望 : 4
    注册日期 : 10-03-02
    年龄 : 8

    普通 回复: [转帖]红宝石全能版二次开发代码专区

    帖子 由 一品明灯 于 2010-03-11, 14:35

    re:'===================...
    '==========================================================
    ' 偏 度 分 析
    '==========================================================
    Function Main
    '===============申明或定义变量=============
    CpRowCount = CpData.RowCount '号码数
    CpColCount = CpData.ColCount '记录数
    CpMaxCode = CpData.MaxCode '最大号码
    CpMinCode = CpData.MinCode '最小号码
    CpCodeCount = CpData.CodeCount '号码个数
    '=================建表=================
    CpAna.AddField "期号",8
    CpAna.AddField "开奖号码",25
    CpAna.AddField "号码偏度值",25
    CpAna.AddField "偏度值",8
    CpAna.RowCount=CpRowCount '定义行数
    CpAna.CreateTable()

    '==============算法主体=================
    ReDim Data(CpColCount) '定义数组
    ReDim PdData(CpMaxCode) '偏度数组

    For row=0 to CpRowCount-1
    CpAna.Cell(row,"期号")=CpData.Seq(row)
    CpAna.Cell(row,"开奖号码")=CpData.CodeStr(row)

    If row<>0 Then
    pdstr=""
    For col=0 to CpColCount-1
    For col1=0 to CpColCount-1
    Data(col1)=Abs(CpData.Code(row,col)-CpData.Code(row-1,col1))
    Next

    min=1000
    For col1=0 to CpColCount-1
    If Data(col1) min=Data(col1)
    End if
    Next

    dData(col)=min '将最小值放入偏度数组
    pdstr=pdstr+" "+CStr(min)
    Next
    CpAna.Cell(row,"号码偏度值")=pdstr

    pdmax=0
    For col=0 to CpColCount-1 '取出偏度值
    if PdData(col)>pdmax Then
    pdmax=PdData(col)
    End If
    Next
    CpAna.Cell(row,"偏度值")=pdmax
    End If
    Next
    End Function


    _________________
    一流的条件 精彩的论坛
    avatar
    一品明灯
    Admin

    帖子数 : 292
    积分 : 720
    威望 : 4
    注册日期 : 10-03-02
    年龄 : 8

    普通 回复: [转帖]红宝石全能版二次开发代码专区

    帖子 由 一品明灯 于 2010-03-11, 14:35

    re:'===================...
    '==========================================================
    ' 振 幅 分 析
    '==========================================================
    '3D近几期开奖号:
    '1 5 7
    '5 7 1
    '8 8 5
    '2 1 7
    '1 1 5
    '各位置的振幅为:
    '0 0 0
    '4 2 6
    '3 1 4
    '6 7 2
    '1 0 2
    '和值为:
    '13
    '13
    '21
    '10
    '7
    '和值振幅为:
    '0
    '0
    '8
    '11
    '3
    '那么 1+2 ,1+3 ,2+3 的振幅呢!?
    '其他分析指标的振幅,也可以用来如上的分析,过滤。
    '实战中也有很高的参考意义,这个就不用细说了!
    '目前只能用手工统计,很麻烦!

    '==========================================================
    ' 主 程 序
    '==========================================================
    CpParam.Add "前期期数",1 '用户设置参数

    '表达式列表 使用了一些号码段的特性
    set CpSec = CreateObject("BoaoHbsActive.CpSec")
    CpSec.Add "1振幅=<1>"
    CpSec.Add "2振幅=<2>"
    CpSec.Add "3振幅=<3>"
    CpSec.Add "4振幅=<4>"
    CpSec.Add "5振幅=<5>"
    CpSec.Add "6振幅=<6>"
    CpSec.Add "7振幅=<7>"

    Function Main
    '===============申明或定义变量=============
    CpRowCount = CpData.RowCount
    CpColCount = CpData.ColCount
    CpMaxCode = CpData.MaxCode
    CpMinCode = CpData.MinCode

    Pub_QS = CInt(CpParam.Value("前期期数"))
    '=================建表=================
    CpAna.AddField "期号",8
    CpAna.AddField "开奖号码",20
    CpAna.AddField "和值振幅",10
    For i = 0 to CpSec.Count-1
    CpAna.AddField CpSec.Name(i), 6
    Next
    CpAna.RowCount = CpRowCount
    CpAna.CreateTable()

    '==============算法主体============================
    set Exp0=CreateObject("BoaoHbsActive.Expressor")
    set Exp1=CreateObject("BoaoHbsActive.Expressor")
    ReDim Code0(CpSec.Count)
    ReDim Code1(CpSec.Count)

    For row=0 to Pub_Qs
    CpAna.Cell(row,"期号")=CpData.Seq(row)
    CpAna.Cell(row,"开奖号码")=CpData.CodeStr(row)
    Next

    For row=Pub_Qs to CpRowCount-1
    CpAna.Cell(row,"期号") = CpData.Seq(row)
    CpAna.Cell(row,"开奖号码") = CpData.CodeStr(row)

    '求和分值|初始化表达式变量
    Hfz0=0
    Hfz1=0
    Exp0.ClearVar
    Exp1.ClearVar
    For col=0 to CpColCount-1
    m=CpData.Code(row-Pub_Qs,col)
    Hfz0=Hfz0+m
    Exp0.SetVar col+1,m '设置变量

    m=CpData.Code(row,col)
    Hfz1=Hfz1+m
    Exp1.SetVar col+1,m '设置变量
    Next

    '求各表达式值
    For i=0 to CpSec.Count-1
    Code0(i)=Exp0.JiSuan(CpSec.Sec(CInt(i))) '计算表达式
    Code1(i)=Exp1.JiSuan(CpSec.Sec(CInt(i))) '计算表达式
    Next

    '写入振幅
    CpAna.Cell(row,"和值振幅")=abs(Hfz1-Hfz0)
    For i=0 to CpSec.Count-1
    CpAna.Cell(row,CpSec.Name(i))=abs(Code1(i)-Code0(i))
    Next

    Next
    End Function


    _________________
    一流的条件 精彩的论坛
    avatar
    一品明灯
    Admin

    帖子数 : 292
    积分 : 720
    威望 : 4
    注册日期 : 10-03-02
    年龄 : 8

    普通 回复: [转帖]红宝石全能版二次开发代码专区

    帖子 由 一品明灯 于 2010-03-11, 14:35

    re:'===================...
    '==========================================================
    ' 斜 码 统 计
    '==========================================================

    Function Main
    '===============申明或定义变量=============
    CpRowCount = CpData.RowCount
    CpColCount = CpData.ColCount
    CpMaxCode = CpData.MaxCode
    CpMinCode = CpData.MinCode
    CpCodeCount = CpData.CodeCount
    '=================建表=================
    '
    CpAna.AddField "期号",8
    CpAna.AddField "开奖号码",20
    For i = CpMinCode to CpMaxCode
    'CpAna.AddField i & "斜码次数",8
    CpAna.AddField i & "斜码率%",8
    Next

    CpAna.RowCount = CpData.RowCount
    CpAna.CreateTable()

    '==============算法主体==========================
    ReDim ZjNum(CpCodeCount) '统计号码中奖次数
    ReDim XmZjNum(CpCodeCount) '统计斜码中奖次数
    ReDim XmZjbl(CpCodeCount+1) '斜码中奖比率

    For i=1 to CpCodeCount '清空数组
    ZjNum(i)=0
    XmZjNum(i)=0
    XmZjbl(i)=0
    Next

    For row = 0 to CpRowCount-1
    For col = 0 to CpColCount-1
    m = CpData.Code(row,col) '取中奖号码
    ZjNum(m) = ZjNum(m) + 1 '计算号码中奖次数
    If row > 0 Then '判断是不是第一次开奖,第二期以后才有斜码
    For i = 0 to CpColCount-1
    If abs( m - CpData.Code(row - 1,i) ) = 1 Then '判断是不是斜码
    XmZjNum(m) = XmZjNum(m) + 1 '计算斜码中奖次数
    Exit For '斜码已经统计则退出,避免重复计算
    End if
    Next
    End If
    XmZjbl(m) = Round(XmZjNum(m)/ZjNum(m)*100) '计算斜码率
    Next

    CpAna.Cell(row, "期号") = CpData.Seq(row)
    CpAna.Cell(row, "开奖号码") = CpData.CodeStr(row)

    For j = CpMinCode to CpMaxCode
    'CpAna.Cell( row,j & "斜码次数") = XmZjNum(j)
    CpAna.Cell( row,j & "斜码率%") = XmZjbl(j)
    Next

    Next

    End Function


    _________________
    一流的条件 精彩的论坛
    avatar
    一品明灯
    Admin

    帖子数 : 292
    积分 : 720
    威望 : 4
    注册日期 : 10-03-02
    年龄 : 8

    普通 回复: [转帖]红宝石全能版二次开发代码专区

    帖子 由 一品明灯 于 2010-03-11, 14:36

    re:'==================...
    '===============================================
    ' 基号个位大小比较
    '===============================================
    CpParam.Add "基号", 2'用户设置参数
    CpParam.Add "-基号", 1'用户设置参数
    Function Main
    '===============申明或定义变量=============
    CpRowCount = CpData.RowCount
    CpColCount = CpData.ColCount
    CpMaxCode = CpData.MaxCode
    CpMinCode = CpData.MinCode

    Pub_JH1 = CInt(CpParam.Value("基号"))
    Pub_JH2 = CInt(CpParam.Value("-基号"))

    '=================建表=================
    CpAna.AddField "期号",8
    CpAna.AddField "开奖号码",20
    CpAna.AddField "基号比较形态",12

    For i=0 to CpColCount - 1
    If i = CpColCount - 1 Then
    CpAna.AddField "基" & i+1 & "-基1",7
    Else
    CpAna.AddField "基" & i+2 & "-基" & i+1,7
    End If
    Next

    CpAna.AddField "2",3
    CpAna.AddField "1",3
    CpAna.AddField "0",3

    CpAna.AddField "选择:基" & Pub_JH1 & "-基" & Pub_JH2,13

    CpAna.RowCount = CpRowCount
    CpAna.CreateTable()
    '==============算法主体============================
    ReDim XTArr(CpColCount - 1)



    For row = 0 to CpRowCount - 1
    CpAna.Cell(row, "期号") = CpData.Seq(row)
    CpAna.Cell(row, "开奖号码") = CpData.CodeStr(row)
    JHXT=""

    If (CpData.Code(row,Pub_JH1-1) Mod 10-CpData.Code(row,Pub_JH2-1) Mod 10)>0 Then
    XZXT=2
    Else
    If (CpData.Code(row,Pub_JH1-1) Mod 10-CpData.Code(row,Pub_JH2-1) Mod 10)<0 Then
    XZXT=1
    End If
    If (CpData.Code(row,Pub_JH1-1) Mod 10-CpData.Code(row,Pub_JH2-1) Mod 10)=0 Then
    XZXT=0
    End If
    End If

    For col = 0 to CpColCount - 1
    If col = CpColCount - 1 Then
    If (CpData.Code(row,col) Mod 10 - CpData.Code(row,0) Mod 10) > 0 Then
    XT = 2
    Else
    If (CpData.Code(row,col) Mod 10 - CpData.Code(row,0) Mod 10) < 0 Then
    XT = 1
    End If

    If (CpData.Code(row,col) Mod 10 - CpData.Code(row,0) Mod 10) = 0 Then
    XT=0
    End If
    End If
    Else
    If (CpData.Code(row,col+1) Mod 10 - CpData.Code(row,col) Mod 10) > 0 Then
    XT = 2
    Else
    If (CpData.Code(row,col+1) Mod 10 - CpData.Code(row,col) Mod 10) < 0 Then
    XT = 1
    End If
    End If
    If (CpData.Code(row,col+1) Mod 10 - CpData.Code(row,col) Mod 10) = 0 Then
    XT=0
    End If
    End If

    XTArr(col)=XT
    JHXT=JHXT & XT
    Next

    CpAna.Cell(row, "基号比较形态") = JHXT

    GS0=0
    GS1=0
    GS2=0

    For i=0 to CpColCount - 1
    CpAna.Cell(row, i+3) = XTArr(i)

    If XTArr(i)=0 Then
    GS0=GS0+1
    Else
    If XTArr(i)=1 Then
    GS1=GS1+1
    End If
    If XTArr(i)=2 Then
    GS2=GS2+1
    End If
    End If
    Next

    CpAna.Cell(row, "2") = GS2
    CpAna.Cell(row, "1") = GS1
    CpAna.Cell(row, "0") = GS0

    CpAna.Cell(row, 6+CpColCount) = XZXT

    Next
    End Function


    _________________
    一流的条件 精彩的论坛

      目前的日期/时间是2018-04-25, 02:07