按此方法设置了http://www.weistock.com/bbs/dispbbs.asp?boardid=5&ID=11344
VBA中:
Function QQMSGX (Formula,QQNum,QQMSG)
QQMSG=document.GetExtString("QQSTR")
Set obj = CreateObject("WWSCommon.TCGroup")
bq = " 交易系统信号发布 "
mxmsg = bq &" " & Date &" " & Time & vbCrLf & " 信号" & " " & QQMSG
call obj.TransMessage("金字塔程序化交易群S", mxmsg)
Set obj = Nothing
Set obj = CreateObject("WWSCommon.TCGroup")
call obj.TransMessage("Miss", mxmsg)
Set obj = Nothing
End Function
Function QQMSSG(Formula,QQNum,QQMSG)
'系统会在逐K线模式解释公式时的每个周期都会调用此函数一遍,因此设计时应该注重程序的执行效率,不要重复的执行一些没必要的代码
QQMSG=document.getextData("字符串") '获取公式中设置的变量值
Set obj = CreateObject("WWSCommon.TCGroup")
call obj.TransMessage(315416174, QQMSG)
Set obj = Nothing
End Function
金字塔公式中:
GLOBALVARIABLE: bb=0;
VBuy:l<=o;
VSell:h>=o;
if islastbar and bb<>barpos and not(VBuy) and not(VSell) then
begin
bb:= barpos;
extgbstringSet('QQSTR','PR '+numtostr(close,5) + ' OB '+numtostr(h,5)+' OS '+numtostr(l,5) );
VQQM:=QQMSGX(1,close);
end
if VBuy then
begin
buy(1,1,limitr,c); {开多}
if islastbar and bb<>barpos then
begin
bb:= barpos;
extgbstringSet('QQSTR','1分钟超卖,尝试开多:'+numtostr(close,5));
VQQM:=QQMSGX(1,close);
end
end;
if VSell then
begin
sell(1,1,limitr,c); {开多}
if islastbar and bb<>barpos then
begin
bb:= barpos;
extgbstringSet('QQSTR','1分钟超买,尝试开空:'+numtostr(close,5));
VQQM:=QQMSGX(1,close);
end
end;
但是 显示
求版主看看 如何 解决~~谢谢啦
1、在公式编辑器界面中,鼠标在“函数”解释定义区单击右键,然后选择“添加自定义函数”。
是通过这种方式添加了qqmsgx自定义的函数吗??