求老师们指导
根据指标线的变色来判定交易,我该怎么写?用那些函数?你应该知道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);
string BUY="false";
string SELL="false";
if((TradeAtSignal&&SDL5>SDL4&&SDL4<SDL3)||(TradeAtSignal==false&&SDL4<SDL3))BUY="true";
if((TradeAtSignal&&SDL5<SDL4&&SDL4>SDL3)||(TradeAtSignal==false&&SDL4>SDL3))SELL="true";
页:
[1]