您现在的位置:程序化交易>> 期货公式>> 金字塔等>> 金字塔模型>>正文内容

QQ及时信号发送事例[金字塔模型]

  • Sub APPLICATION_VBAStart()
     call Application.SetTimer(0,300) '创建一个0号定时器,间隔时间3秒
    End Sub

    Sub APPLICATION_Timer(ID)
    Set Formula = marketdata.STKINDI("if00","zj","短线1号",0,17)'品种、周期、指标修改为自己需要的。
        cc =  Formula.GetBufData("mxcc",Formula.DataSize-1) '显示最后周期指标线数值
        refcc = Formula.GetBufData("mxcc",Formula.DataSize-2) '显示倒数第二周期指标线数值
           
    set Report1 = marketdata.GetReportData("if00","zj")
        ifjg = Report1.NewPrice
       
    Set obj = CreateObject("WWSCommon.TCGroup")
        bq = "明心股指日内3分钟"'这里是信号之前的版权(广告)
        IF refcc=0 and cc>0 then
           mxmsg = bq &" " & Date &" " &Time&vbCrLf&"股指期货"&" " &ifjg&" " &"开多"&cc&"手。"
           'application.MsgOut mxmsg
           call obj.TransMessage("程序化初级群", mxmsg)
           Set obj = Nothing
        elseIF refcc>0 and cc=0 then
           mxmsg = bq &" " &  Date &" " &Time&vbCrLf&"股指期货"&" " &ifjg&" " &"平多"&refcc&"手。"
           'application.MsgOut mxmsg
           call obj.TransMessage("程序化初级群", mxmsg)
           Set obj = Nothing
        elseIF refcc=0 and cc<0 then
           ss = 0-cc
           mxmsg = bq &" " &  Date &" " &Time&vbCrLf&"股指期货"&" " &ifjg&" " &"开空"&ss&"手。"
           'application.MsgOut mxmsg
           call obj.TransMessage("程序化初级群", mxmsg)
           Set obj = Nothing
        elseIF refcc<0 and cc=0 then
           ss = 0-refcc
           mxmsg = bq &" " &  Date &" " &Time&vbCrLf&"股指期货"&" " &ifjg&" " &"平空"&ss&"手。"
           'application.MsgOut mxmsg
           call obj.TransMessage("程序化初级群", mxmsg)
           Set obj = Nothing
        else
         'mxmsg =bq &" " &  Date &" " &Time&vbCrLf&"暂无变化,保持之前状态。"
         'application.MsgOut mxmsg
         'call obj.TransMessage("程序化初级群", mxmsg)
         'Set obj = Nothing
        end if
          
    end sub

    Sub qq()
        call APPLICATION_Timer(ID)
    End Sub

     

 

有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流进行 有偿 编写!不贵!点击查看价格!

 


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容