哪位朋友帮我看一下,指标为何不划线呢

 

//为何只划m_01时,不画出来,加上画HH_h或是LL_l中的任一个或是二个,就画出来了,帮我看看为何这样,我只想单画m_01这条线

#property copyright "Copyright ?2009, MetaQuotes Software Corp."
#property link "https://www.metaquotes.net/"
#include <stdlib.mqh>
#include <WinUser32.mqh>
#property indicator_separate_window
//#property indicator_chart_window
#property indicator_buffers 7
#property indicator_color1 Blue//High
#property indicator_color2 Red//Low
#property indicator_color3 LightSteelBlue//Close
#property indicator_color4 Yellow//TLine_01
#property indicator_color5 Magenta//TLine_02
#property indicator_color6 LightSalmon//TLine_03
#property indicator_color7 SpringGreen
extern int h_n = 10;
extern int l_n = 10;
int limit,level=2;
double HH_h[],LL_l[],TLine_01[],TLine_02[],TLine_03[],TLine_04[],m_01[];

int init() {
IndicatorBuffers(7);
//SetIndexStyle(0, DRAW_LINE, EMPTY, 3);
//SetIndexBuffer(0, HH_h);//High
//SetIndexStyle(1, DRAW_LINE, EMPTY, 3);
//SetIndexBuffer(1, LL_l);//Low
SetIndexStyle(2, DRAW_LINE, EMPTY, 3);
SetIndexBuffer(2, m_01);//Close
SetIndexLabel(2,"m_01");

return (0);
}
int deinit() {
return (0);
}
int start()
{
int counted_bars = IndicatorCounted();
if(counted_bars>0) counted_bars--;
limit = Bars -counted_bars;

for(int i=0; i<limit; i++){
HH_h[i] = High[Highest(NULL,0,MODE_HIGH,h_n,i)];
LL_l[i] = Low[Lowest(NULL,0,MODE_LOW,l_n,i)];
//m_01[i] =((Close[i] - LL_l[i]) / (HH_h[i] - LL_l[i]))*100 ;

}
for(i=0; i<limit; i++){

m_01[i] =((Close[i] - LL_l[i]) / (HH_h[i] - LL_l[i]))*100 ;

}
return(0);
}

 

需要纵向放大。

m_01[]的值太大了,把其它2根线压缩的看不见了。

 

#property indicator_buffers 1
设置成1 不用7

#property indicator_color1 Blue

只要1个就行了 不用7个都设置

SetIndexStyle(0, DRAW_LINE );
SetIndexBuffer(0, m_01);
将第0号线设成要划线就行了

其他的设置成不划线就行了

 

谢谢二位朋友回复

1\我是看不到m_01的线,其他的线能看到,

2\因为,我还有要画的线,所以设了#property indicator_buffers 7

我按你们说的试一下