//+------------------------------------------------------------------+ //| SweetSpots.mq4 | //| | //| | //+------------------------------------------------------------------+ #property copyright "Copyright Shimodax" #property link "http://www.strategybuilderfx.com" #property indicator_chart_window extern int LinesAboveBelow= 10; extern color LineColorMain= LightGray; extern color LineColorSub= Gray; extern int LinesTextPosition= 0; extern int LinesTextPad = 30; int OrgDigits= 2; double OrgPoints= 0.01; int JPYMultiplier = 100; string TextPad = ""; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { if(StringFind(Symbol(),"JPY") == -1){ JPYMultiplier =1; OrgDigits = 4; OrgPoints = 0.0001; } for(int i=0;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 (TimeCurrent()-timelastupdate < 600 && Period()==lasttimeframe) return (0); timelastupdate = TimeCurrent(); lasttimeframe = Period(); int i, ssp1, style, ssp; double ds1; color linecolor; ssp1= (JPYMultiplier/Close[0]) / OrgPoints; ssp1= ssp1 - ssp1%50; for (i= -LinesAboveBelow; i