以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  请教variable的用法  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=85803)

--  作者:开开心心
--  发布时间:2015/10/1 11:13:12
--  请教variable的用法
请问老师,variable直接用于后台交易有没有问题,下面的交易模式有没有问题
variable:n=0;
if DYNAINFO(28)=75500 and tholding>0 and n<3 then
begin
tsell(1,0,lmt,75600);
tbuyshort(1,1,lmt,75610);
end

if DYNAINFO(28)=75500 and tholding>0 and 3<n<6 then
begin
tsell(1,0,lmt,75600);
tbuyshort(1,2,lmt,75610);
end

--  作者:jinzhe
--  发布时间:2015/10/8 8:57:43
--  

这个是图表交易用的全局变量,后台使用

GLOBALVARIABLE或者extgbdataset