//+------------------------------------------------------------------+ //| Elder_Impulse_System_v1.0.mq4 | //| Copyright 2020, NickBixy | //| https://www.forexfactory.com/showthread.php?t=904734 | //+------------------------------------------------------------------+ #property copyright "NickBixy" #property link "https://www.forexfactory.com/showthread.php?t=904734" //#property version "1.00" #property strict #property indicator_chart_window #property indicator_buffers 3 input string ArrowHeader="-----------------Arrows Settings------------------------------------------";//----- Arrows Settings input double shiftMultiplier=.30;//Shift Multipilier Arrows up or down more input int atrValue=21;//ATR value for arrow draw distance input string info="https://docs.mql4.com/constants/objectconstants/wingdings";//Windings font symbols input color bullishArrowColor=clrLime;//Impulse Up Arrow Color input int bullishWinding=159;//Impulse Up Arrow Wingding Character input int bullishArrowSize=1;//Impulse Up Arrow Size 0-5 input color bearishArrowColor=clrRed;//Impulse Down Arrow Color input int bearishWinding=159;//Impulse Down Arrow Wingding Character input int bearishArrowSize=1;//Impulse Down Arrow Size 0-5 input color neutralArrowColor=clrBlue;//Impulse Neutral Arrow Color input int neutralArrowWinding=159;//Impulse Neutral Arrow Wingding Character input int neutralArrowSize=1;//Impulse Neutral Arrow Size 0-5 double BEARISH[]; double BULLISH[]; double NEUTRAL[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { IndicatorShortName("EIS Arrows"); //Bearish Set up SetIndexLabel(0,"EIS Bearish"); SetIndexStyle(0,DRAW_ARROW,STYLE_SOLID,bearishArrowSize,bearishArrowColor);//sell SetIndexArrow(0,bearishWinding); SetIndexBuffer(0,BEARISH); //Bullish Set up SetIndexLabel(1,"EIS Bullish"); SetIndexStyle(1,DRAW_ARROW,STYLE_SOLID,bullishArrowSize,bullishArrowColor);//buy SetIndexArrow(1,bullishWinding); SetIndexBuffer(1,BULLISH); //NEUTRAL Set up SetIndexLabel(2,"EIS Neutral"); SetIndexStyle(2,DRAW_ARROW,STYLE_SOLID,neutralArrowSize,neutralArrowColor);//Neutral SetIndexArrow(2,neutralArrowWinding); SetIndexBuffer(2,NEUTRAL); ArrayInitialize(BEARISH,0.0); ArrayInitialize(BULLISH,0.0); ArrayInitialize(NEUTRAL,0.0); return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void deinit() { ObjectsDeleteAll(0,"EIS",0,OBJ_ARROW) ; } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int limit; int counted_bars=IndicatorCounted(); //---- check for possible errors if(counted_bars<0) return(-1); //---- the last counted bar will be recounted if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; //---- main loop for(int i=0; i