VBA里获取不到SAR指标值 [金字塔]
- 咨询内容:
msgbox FormulaSar.GetBufData("SAR",Data1.Count-i)总是结果出错,后来发现公式SAR没有显示值,就简单的“SAR(P,STEP,MAXP),CIRCLEDOT”,后来给SAR加了显示值,如“SARV:SAR(P,STEP,MAXP),CIRCLEDOT”,也是调用失败,后来自己手动新加了一个公式也调用失败,请问应该如何调用,谢谢
- 金字塔客服:
完整贴下你的FormulaSar代码呢
光看这句看不出问题可能
- 用户回复:
Set Data1= marketdata.GetHistoryData("if06","zj",6)
Set Formula = marketdata.StkindiByData("SAR",Data1)for i=Data2.Count-20 to Data2.Count-1
msgbox Formula.GetBufData("SAR",Data1.Count-i)
next
如果换成MACD就成功了
Set Data1= marketdata.GetHistoryData("if06","zj",6)
Set Formula = marketdata.StkindiByData("MACD",Data1)for i=Data2.Count-20 to Data2.Count-1
msgbox Formula.GetBufData("DEA",Data1.Count-i)
next
- 网友回复:
Sub UserForm1_CommandButton1_Click()Set Data1= marketdata.GetHistoryData("if06","zj",2)Set Formula = marketdata.StkindiByData("SAR",Data1)for i=1 to 5
msgbox Formula.GetBufData("SARV",Data1.Count-i)next
End Sub上面的失败
Sub UserForm1_CommandButton1_Click()Set Data1= marketdata.GetHistoryData("if06","zj",2)Set Formula = marketdata.StkindiByData("MACD",Data1)for i=1 to 5
msgbox Formula.GetBufData("DEA",Data1.Count-i)next
End Sub成功 - 网友回复:
您先看下SAR指标
里面有没有sarv这个指标输出变量
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 511411198 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容