High Programmers,

that I was unable to show all indior buffer lines on the chart. Just the first one is revealed. Please note that the lines represent different time periods and shifts.

It will be appreciated if someone fixes the indior and show me where I got it wrong.

Inserted Code // ------------------------------------------------------------------ //| Trend.mq4 | // ------------------------------------------------------------------ #property copyright Copyright © 2004, MetaQuotes Software Corp. #property link #91;url#93;http://www.metaquotes.net/#91;/url#93; //-- indior configurations #property indior_chart_window #property indior_buffers 4 //---------------------- #property indior_color1 Green #property indior_color2 Red #property indior_color3 Blue #property indior_color4 Orange //-- indiors parameters extern int LWMA_Fast=7; extern int MACD_Fast=12; extern int MACD_Slow=26; extern int MACD_Signal=9; //-- indior buffers double LWMA_Buffer_1Number 91;#93;; double LWMA_Buffer_2#91;#93;; double MACD_Buffer_0#91;#93;; double MACD_Buffer_1#91;#93;; //-- // ------------------------------------------------------------------ //| Custom indior initialization serve | // ------------------------------------------------------------------ int init() IndiorBuffers(4); //-- drawing settings SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2); SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,2); SetIndexStyle(2,DRAW_LINE,STYLE_SOLID,2); SetIndexStyle(3,DRAW_LINE,STYLE_SOLID,2); //-- indior buffers mapping SetIndexBuffer(0,LWMA_Buffer_1); SetIndexBuffer(1,LWMA_Buffer_2); SetIndexBuffer(2,MACD_Buffer_0); SetIndexBuffer(3,MACD_Buffer_1); //-- name/label to get indiors IndiorShortName(Trend); SetIndexLabel(0,LWMA_Buffer_1); SetIndexLabel(1,LWMA_Buffer_2); SetIndexLabel(2,MACD_Buffer_0); SetIndexLabel(3,MACD_Buffer_1); //-- return(0); // ------------------------------------------------------------------ //| Custom indior start operate | // ------------------------------------------------------------------ int start() int limit; int counted_bars=IndiorCounted(); //-- last counted pub will probably be recounted if(counted_barsgt;0) counted_bars--; limit=Bars-counted_bars; //-- LWMANumber 91;1#93; fold for(int I=0; ilt;limitation; I ) LWMA_Buffer_1#91;I 1#93;=iMA(Symbol(),PERIOD_H4,LWMA_Fast,0,MODE_LWMA ,PRICE_TYPICAL,I 1); //-- LWMA#91;two #93; fold for(I=0; ilt;limitation; I ) LWMA_Buffer_1#91;I 2#93;=iMA(Symbol(),PERIOD_H4,LWMA_Fast,0,MODE_LWMA ,PRICE_TYPICAL,I 2); //-- MACD#91;0#93; loop for(I=0; ilt;limitation; I ) MACD_Buffer_0#91;I#93;=iMACD(NULL,PERIOD_D1,MACD_F ast,MACD_Slow,MACD_Signal,PRICE_WEIGHTED,MODE_MAIN ,I); //-- MACD#91;1#93; loop for(I=0; ilt;limitation; I ) MACD_Buffer_1#91;I 1#93;=iMACD(NULL,PERIOD_D1,MACD_Fast,MACD_Slow,MAC D_Signal,PRICE_WEIGHTED,MODE_MAIN,I 1); //-- done return(0); // --------------------------------
Regards,