void drawArrow(int i,color theColor,int theCode,bool up)
{
string name = arrowsIdentifier+":"+Time[i];
double gap = 3.0*iATR(NULL,0,20,i)/4.0;
ObjectCreate(name,OBJ_ARROW,0,Time[i],0);
ObjectSet(name,OBJPROP_ARROWCODE,theCode);
ObjectSet(name,OBJPROP_COLOR,theColor);
ObjectSet(name,OBJPROP_WIDTH,aw);
if (up)
ObjectSet(name,OBJPROP_PRICE1,High[i]+ arrowsUpperGap*Point);
else ObjectSet(name,OBJPROP_PRICE1,Low[i] - arrowsLowerGap*Point);
}
void deleteArrows()
{
string lookFor = arrowsIdentifier+":";
int lookForLength = StringLen(lookFor);
for (int i=ObjectsTotal()-1; i>=0; i--)
{
string objectName = ObjectName(i);
if (StringSubstr(objectName,0,lookForLength) == lookFor) ObjectDelete(objectName);
}
}
void deleteArrow(datetime time)
{
string lookFor = arrowsIdentifier+":"+time; ObjectDelete(lookFor);
}