以文本方式查看主题

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

--  作者:jckk
--  发布时间:2015/4/3 14:38:02
--  请问版主一个问题

一个图表策略,跟信号用手动操作。能否在信号处添加提示音?


--  作者:jinzhe
--  发布时间:2015/4/3 14:43:36
--  
使用playsound函数,playsound的条件写开仓条件
--  作者:jckk
--  发布时间:2015/4/3 15:02:05
--  

请版主帮忙改一下。

 

if holding=0 and myfailtrade=1 and time<151500 then begin
 if entrylongcond then
  buy(1,1,limitr,max(open,entryupperband));
end

if holding=0 and myfailtrade=1 and time<151500 then begin
 if entryshortcond then
  buyshort(1,1,limitr,min(open,entrylowerband));
end

if holding>0 then begin
 if exitlongcond then
  sell(1,holding,limitr,min(open,exitlowerband));
end

if holding<0 then begin
 if exitshortcond then
  sellshort(1,holding,limitr,max(open,exitupperband));
end


--  作者:jinzhe
--  发布时间:2015/4/3 15:09:22
--  

if holding=0 and myfailtrade=1 and time<151500 then begin
 if entrylongcond then
  buy(1,1,limitr,max(open,entryupperband));

  playsound(1,\'所需要播放声音的路径名\');
end

if holding=0 and myfailtrade=1 and time<151500 then begin
 if entryshortcond then
  buyshort(1,1,limitr,min(open,entrylowerband));

  playsound(1,\'所需要播放声音的路径名\');

end

if holding>0 then begin
 if exitlongcond then
  sell(1,holding,limitr,min(open,exitlowerband));

  playsound(1,\'所需要播放声音的路径名\');

end

if holding<0 then begin
 if exitshortcond then
  sellshort(1,holding,limitr,max(open,exitupperband));

  playsound(1,\'所需要播放声音的路径名\');

end


--  作者:jckk
--  发布时间:2015/4/3 15:15:19
--  
O,谢谢版主!!