以文本方式查看主题

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

--  作者:vermouth
--  发布时间:2013/10/30 8:34:40
--  求助。
麻烦老师帮写个这个需求。
 
卖一量大于100的时候开空。
买完之后直接按照0.6止盈来报价挂单
当买一量小于50的时候撤单止损
0.6止损
另外一个情况相反

--  作者:jinzhe
--  发布时间:2013/10/30 8:57:03
--  
0.6止损是股指0.6点?
--  作者:vermouth
--  发布时间:2013/10/30 8:58:19
--  
以下是引用jinzhe在2013/10/30 8:57:03的发言:
0.6止损是股指0.6点?


--  作者:jinzhe
--  发布时间:2013/10/30 9:12:37
--  

if DYNAINFO( 31)>100  then tbuyshort(tsellholding(0)=0,1,mkt);
if tenterprice-dynainfo(7)>0.6 then tsellshort(1,0,mkt);
if DYNAINFO( 25)<50 then tsellshort(1,0,lmt,dynainfo(7)-0.6);


--  作者:vermouth
--  发布时间:2013/10/30 9:30:31
--  
以下是引用jinzhe在2013/10/30 9:12:37的发言:

if DYNAINFO( 31)>100  then tbuyshort(tsellholding(0)=0,1,mkt);
if tenterprice-dynainfo(7)>0.6 then tsellshort(1,0,mkt);
if DYNAINFO( 25)<50 then tsellshort(1,0,lmt,dynainfo(7)-0.6);

 

开空的成交价用买一价来成交。不用市价


--  作者:vermouth
--  发布时间:2013/10/30 9:34:06
--  
以下是引用jinzhe在2013/10/30 9:12:37的发言:

if DYNAINFO( 31)>100  then tbuyshort(tsellholding(0)=0,1,mkt);
if tenterprice-dynainfo(7)>0.6 then tsellshort(1,0,mkt);
if DYNAINFO( 25)<50 then tsellshort(1,0,lmt,dynainfo(7)-0.6);

 

 

不是这个意思。。。

是买完之后直接止盈。不是满足条件之后卖。


--  作者:jinzhe
--  发布时间:2013/10/30 9:47:24
--  

if DYNAINFO( 31)>100  then  begin
 tbuyshort(tsellholding(0)=0,1,lmt,DYNAINFO( 28),0);
 tsellshort(1,0,tenterprice-0.6);
end

if DYNAINFO( 25)<50 then begin
 TCANCELEX(islastbar ,0 ,\'\' ,\'\' );
 tsellshort(1,0,lmt,dynainfo(7)-0.6);
end


--  作者:vermouth
--  发布时间:2013/10/30 11:15:05
--  
 
 
以下是引用jinzhe在2013/10/30 9:47:24的发言:

if DYNAINFO( 31)>100  then  begin
 tbuyshort(tsellholding(0)=0,1,lmt,DYNAINFO( 28),0);
 tsellshort(1,0,tenterprice-0.6);
end

if DYNAINFO( 25)<50 then begin
 TCANCELEX(islastbar ,0 ,\'\' ,\'\' );
 tsellshort(1,0,lmt,dynainfo(7)-0.6);
end

 

 

 

还是有问题。发现不进行交易啊。预警全是平空信号


--  作者:jinzhe
--  发布时间:2013/10/30 11:24:12
--  

if DYNAINFO( 31)>100  then  begin
 tbuyshort(tsellholding(0)=0,1,lmt,DYNAINFO( 28),0);
 tsellshort(tsellholding(0)>0,0,tenterprice-0.6);
end

if DYNAINFO( 25)<50 then begin
 TCANCELEX(islastbar ,0 ,\'\' ,\'\' );
 tsellshort(tsellholding(0)>0,0,lmt,dynainfo(7)-0.6);
end

 

这样限定了一下,有持仓才出平仓信号