//+------------------------------------------------------------------+ //| Level Sensor.mq4 | //| Copyright 2005, Sfen. | //+------------------------------------------------------------------+ #property copyright "Copyright 2005, Sfen" #property indicator_chart_window //---- input parameters extern int MAX_HISTORY=500; extern int STEP = 1; int init() { return(0); } double CSH(int shift) { return (MathMax(Open[shift],Close[shift])); } double CSL(int shift) { return (MathMin(Open[shift],Close[shift])); } string OBJECT_PREFIX = "LEVELS"; int ObjectId = 0; string IntToStr(int X) { return (DoubleToStr(X,0)); } string ObGetUniqueName(string Prefix) { ObjectId++; return (Prefix+" "+IntToStr(ObjectId)); } void ObDeleteObjectsByPrefix(string Prefix) { int L = StringLen(Prefix); int i=0; while (i