1附件已插入代碼#property indior_chart_window/ ------------------------------------- ----------------------------- /|自定義indior初始化函數|/ ----------------------------------------------- ------------------- extern int HMA_Period = 21; extern int History = 500; double hma#91;#93 ;; int init(){IndiorBuffers(1); SetIndexBuffer(0,hma); SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2);返回(0); }/ ---------------------------------------------- -------------------- /|定制indior deinitialization功能|/ ----------------------------------------------- ------------------- int deinit(){//----/---- return(0); }/ ---------------------------------------------- -------------------- /|自定義indior迭代功能|/ ----------------------------------------------- ------------------- int start(){int counted_bars = IndiorCounted(),i = Bars - counted_bars - 1;雙溫; if(i gt; History - 1)i = History - 1; while(i gt; = 1){hma#91; i#93; = iMA(NULL,0,MathFloor(HMA_Period2),0,MODE_LWMA,PRICE_CLOSE,i)* 2- iMA(NULL,0,HMA_Period,0,MODE_LWMA,PRICE_CLOSE,i);一世 - ; } i = Bars - counts_bars - 1; while(i gt; = 1){temp = iMAOnArray(hma,0,MathFloor(MathSqrt(HMA_Period)),0,MODE_LWMA,i); HMA#91; I#93; = temp;一世 - ; } return(0); }/ ---------------------------------------------- --------------------
我的船體移動平均線的問題是有些條形圖顯示了像圖像所示的那些峰值,它來自代碼中的一個我無法找到的問題......如果我把另一個船體移動平均值,它與我的船體相匹配移動平均線除了那個峰值發生的那個柱子...