//+------------------------------------------------------------------+ //| SweetSpots.mq4 | //| | //| | //+------------------------------------------------------------------+ #property copyright "Copyright Shimodax" #property link "http://www.strategybuilderfx.com" //---- #property indicator_chart_window //---- extern int LinesAboveBelow= 10; extern color LineColorMain= Red; extern color LineColorSub= Green; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { return(0); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int deinit() { int obj_total= ObjectsTotal(); for(int i= obj_total; i>=0; i--) { string name= ObjectName(i); if (StringSubstr(name,0,11)=="[SweetSpot]") ObjectDelete(name); } return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { static datetime timelastupdate= 0; static datetime lasttimeframe= 0; // no need to update these buggers too often if (CurTime()-timelastupdate < 600 && Period()==lasttimeframe) return(0); int i, ssp1, style, ssp; double ds1; color linecolor; //---- ssp1= Bid/Point; ssp1= ssp1 - ssp1%50; for(i= -LinesAboveBelow; i