你应该知道slope direction line 指标, 可以拿来研究下
然后在看下下面的代码, 你大概会明白其中的编写逻辑
//|---------main signal
double SDL3=iCustom(Symbol(),0,"Slope Direction Line",period,method,price,2,i+2);
double SDL4=iCustom(Symbol(),0,"Slope Direction Line",period,method,price,2,i+1);
double SDL5=iCustom(Symbol(),0,"Slope Direction Line",period,method,price,2,i);