#property copyright "Copyright Blue Mental Incorporated" #property indicator_separate_window #property indicator_buffers 8 #property indicator_color1 Purple #property indicator_color2 MediumOrchid #property indicator_color3 Violet #property indicator_color4 White #property indicator_color5 RoyalBlue #property indicator_color6 Black #property indicator_color7 Indigo #property indicator_color8 Indigo #property indicator_width1 14 #property indicator_width2 12 #property indicator_width3 10 #property indicator_width4 8 #property indicator_width5 6 #property indicator_width6 4 #property indicator_width7 2 #property indicator_width8 1 int MA1 = 500; int MA2 = 290; int MA3 = 47; int MA4 = 14; int MA5 = 8; int MA6 = 2; int MA7 = 1; /* int MA1 = 34; int MA2 = 21; int MA3 = 13; int MA4 = 5; */ double CurrentTick[]; double MA1Tick[]; double MA2Tick[]; double MA3Tick[]; double MA4Tick[]; double MA5Tick[]; double MA6Tick[]; double MA7Tick[]; double MinuteLine[]; double mArrow[]; int CurrentTime = 0; int Once = 0; int BarCount = 0; int PreviousTime = 0; int init() { SetIndexBuffer(0, MA1Tick); SetIndexBuffer(1, MA2Tick); SetIndexBuffer(2, MA3Tick); SetIndexBuffer(3, MA4Tick); SetIndexBuffer(4, MA5Tick); SetIndexBuffer(5, MA6Tick); SetIndexBuffer(6, CurrentTick); SetIndexBuffer(7, MinuteLine); SetIndexStyle(0, DRAW_LINE); SetIndexStyle(1, DRAW_LINE); SetIndexStyle(2, DRAW_LINE); SetIndexStyle(3, DRAW_LINE); SetIndexStyle(4, DRAW_LINE); SetIndexStyle(5, DRAW_LINE); SetIndexStyle(6, DRAW_LINE); SetIndexStyle(7, DRAW_LINE); CurrentTime = TimeCurrent(); NewBar(); return (0); } int deinit() { return (0); } int start() { int x=0; int cPos,pPos; double cVal,pVal; int xTag; while(MinuteLine[x]==EMPTY_VALUE&&x<1000) { x++; } if(x<1000){cPos=x;cVal=MinuteLine[x];} x++; while(MinuteLine[x]==EMPTY_VALUE&&x<1000) { x++; } if(x<1000){pPos=x;pVal=MinuteLine[x];} double CurrentBid = Bid; if (NewBar() == 1) { MinuteLine[0]=CurrentBid; BarCount++; for (int Count = 1; Count < BarCount; Count++) { MA1Tick[Count - 1] = MA1Tick[Count]; MA2Tick[Count - 1] = MA2Tick[Count]; MA3Tick[Count - 1] = MA3Tick[Count]; MA4Tick[Count - 1] = MA4Tick[Count]; MA5Tick[Count - 1] = MA5Tick[Count]; MA6Tick[Count - 1] = MA6Tick[Count]; MA7Tick[Count - 1] = MA7Tick[Count]; CurrentTick[Count - 1] = CurrentTick[Count]; MinuteLine[Count-1]=MinuteLine[Count]; } MA1Tick[BarCount - 1] = EMPTY_VALUE; MA2Tick[BarCount - 1] = EMPTY_VALUE; MA3Tick[BarCount - 1] = EMPTY_VALUE; MA4Tick[BarCount - 1] = EMPTY_VALUE; MA5Tick[BarCount - 1] = EMPTY_VALUE; MA6Tick[BarCount - 1] = EMPTY_VALUE; MA7Tick[BarCount - 1] = EMPTY_VALUE; CurrentTick[BarCount - 1] = EMPTY_VALUE; MinuteLine[BarCount-1]=EMPTY_VALUE; BarCount--; } if (CurrentBid == CurrentTick[0] ) return/*(WARN)*/; for (Count = BarCount; Count > 0; Count--) { MA1Tick[Count] = MA1Tick[Count - 1]; MA2Tick[Count] = MA2Tick[Count - 1]; MA3Tick[Count] = MA3Tick[Count - 1]; MA4Tick[Count] = MA4Tick[Count - 1]; MA5Tick[Count] = MA5Tick[Count - 1]; MA6Tick[Count] = MA6Tick[Count - 1]; MA7Tick[Count] = MA7Tick[Count - 1]; CurrentTick[Count] = CurrentTick[Count - 1]; MinuteLine[Count] = MinuteLine[Count-1]; } CurrentTick[Count] = EMPTY_VALUE; if (Once == FALSE) { Once = TRUE; // MinuteLine[0] = CurrentBid; CurrentTick[0] = CurrentBid; BarCount++; } if (TimeMinute(TimeCurrent()) != TimeMinute(CurrentTime)) { MinuteLine[0] = CurrentBid; CurrentTick[0] = CurrentBid; BarCount++; CurrentTime = TimeCurrent(); } else { if (CurrentTick[1] != EMPTY_VALUE) { MinuteLine[0] = EMPTY_VALUE; CurrentTick[0] = CurrentBid; BarCount++; } } int SumTag; double Sum; SumTag=0; Sum=0; for( Count=0;Count