发表于:2007-11-01 00:33只看该作者
2楼
设两对数组,
第一对数组保存当日和前一日之最高价、最低价,用循环来实现
for(int i=0; i
3楼
谢谢 秃鹫
韬客社区www.talkfx.co
4楼
晕 还是不会 请秃鹫老师帮忙写一下吧 谢谢了
[ 本帖最后由 zsh226 于 2007-11-1 18:00 编辑 ]
韬客社区www.talkfx.co
发表于:2007-11-01 13:16只看该作者
5楼
[CODE]
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Red
extern int SMA1=10;
double ind_buffer1;
double ind_buffer2;
double buffer1;
double buffer2;
int init()
{
IndicatorBuffers(4);
SetIndexBuffer(0,ind_buffer1);
SetIndexBuffer(1,ind_buffer2);
SetIndexBuffer(2,buffer1);
SetIndexBuffer(3,buffer2);
SetIndexStyle(0,DRAW_LINE,0,1);
SetIndexStyle(1,DRAW_LINE,0,1);
SetIndexDrawBegin(0,SMA1);
SetIndexDrawBegin(1,SMA1);
return(0);
}
int start()
{
int limit;
int counted_bars=IndicatorCounted();
if(counted_bars<0) return(-1);
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(int i=0; i
6楼
谢谢 秃鹫老师
韬客社区www.talkfx.co