xtfhv111 2008-1-24 06:02
MT编程高手请进
帮忙加一下铃声。让红线大于1。小于0。报警。感激不尽
iemzaj 2008-1-24 14:09
你试试这样效果可以吗?
for(int i=0; i<limit; i++)
{
double B,a1,a2;
a1 = Close[i]- iBands(NULL,0,BandPeriod,Deviation,0,PRICE_CLOSE,MODE_LOWER,i) ;
a2 = iBands(NULL,0,BandPeriod,Deviation,0,PRICE_CLOSE,MODE_UPPER,i) - iBands(NULL,0,BandPeriod,Deviation,0,PRICE_CLOSE,MODE_LOWER,i);
B = a1/a2;
ExtMapBuffer1[i]= B ;
if(ExtMapBuffer1[i+1] > 0 && ExtMapBuffer1[i] < 0 && i==0)Alert("小于0提示:",Symbol()," 时段:",Period(),"分钟,值:",B);
if(ExtMapBuffer1[i+1] < 1.0 && ExtMapBuffer1[i] > 1.0 && i==0)Alert("大于1提示:",Symbol()," 时段:",Period(),"分钟,值:",B);
}
xfxyldj 2008-1-24 17:45
[code]if(ExtMapBuffer1[1] > 0 && ExtMapBuffer1[0] < 0 && i==0)Alert("小于0提示:",Symbol()," 时段:",Period(),"分钟,值:",B);
if(ExtMapBuffer1[i] < 1.0 && ExtMapBuffer1[0] > 1.0 && i==0)Alert("大于1提示:",Symbol()," 时段:",Period(),"分钟,值:",B)[/code]这两句放在for循环外面。
xfxyldj 2008-1-25 09:21
您倒是够可以的。[code]if(ExtMapBuffer1[1] > 0 && ExtMapBuffer1[0] < 0 )Alert("小于0提示:",Symbol()," 时段:",Period(),"分钟,值:",ExtMapBuffer1[0]);
if(ExtMapBuffer1[1] < 1.0 && ExtMapBuffer1[0] > 1.0)Alert("大于1提示:",Symbol()," 时段:",Period(),"分钟,值:",ExtMapBuffer1[0])[/code]这回该差不多了。
[color=Red]稀里糊涂没仔细检查,抱歉![/color]
[[i] 本帖最后由 xfxyldj 于 2008-1-25 16:58 编辑 [/i]]
汇市提款机 2008-2-1 08:05
:yct46 :yct45 :yct44 :yct43