直接勾选可以。不需要再添加语句。
但是我们推荐您在公式里使用代码来实现发送邮件的功能,即sendmail,因为通过代码可以实现自定义邮件标题与内容。
[此贴子已经被作者于2016-12-16 12:44:40编辑过]
以下写法行不行,收到的邮件能不能显示品种和代码?
if CROSS(diff,dea) and CURRENTTIME>103000 and tbuyholding(1)=0 and TTOTALDAYTRADE<1 then BEGIN
tbuy(1,10000/close,mkt);
SENDMAIL(1,'13913992413@139.COM','金叉警报','买');
end
if (J>118 or c>tenterprice*1.045 or c<tenterprice*0.93 or tenterbars>=20 ) and tbuyholding(0)>0 then BEGIN
tsell(1,0,mkt);
SENDMAIL(1 ,'13913992413@139.COM','死叉警报','卖');
end
写法没有问题,但是该语句不会显示品种名称及代码。您可以自己sendmail内进行设置。
WYA001:=(2*CLOSE+HIGH+LOW)/4;
WYA002:=EMA(WYA001,4);
WYA003:=EMA(WYA002,4);
WYA004:=EMA(WYA003,4);
WYA柱:=(WYA004-REF(WYA004,1))/REF(WYA004,1)*100;
WYA线1:=MA(WYA柱,2);
WYA线2:=MA(WYA柱,1);
R:=WYA线1<-0.25 AND WYA线2<-0.25 AND CROSS(WYA线2,WYA线1);
K:=WYA线1>0 AND WYA线2>0 AND CROSS(WYA线2,WYA线1);
macd:=stkindi('','macd.macd1',0,6);//日macd值
J:=stkindi('','kdj.j',0,6);
if (R or K) and macd>ref(macd,1) and CURRENTTIME>093000 and tbuyholding(1)=0 and TTOTALDAYTRADE<1 then BEGIN
tbuy(1,10000/close,mkt);
SENDMAIL(1,'13913992413@139.COM',STKNAME+STKLABEL+'笑脸警报','买');
end
if (J>118 or c>tenterprice*1.045 or c<tenterprice*0.93 or tenterbars>=20 ) and tbuyholding(0)>0 then BEGIN
tsell(1,0,mkt);
SENDMAIL(1,'13913992413@139.COM',STKNAME+STKLABEL+'笑脸警报','卖');
end
以上sendmail语句,收到的邮件标题是错码?
此主题相关图片如下:无标题.png
