Problem Double Stoch Arrow - page 2

 
So have you changed it from the attachment in your first post or not?
 
yes i modify with james code but still have same issue
 
Is this more like what you are looking for?

  if(Stoch1>Level && Stoch3>Level  && ( Stoch2<Level || Stoch4<Level  ))
  {
   UP[i]=Low[i]-distance*MyPoint;
   DOWN[i]=EMPTY_VALUE;
   if(CTime!=Time[0])
    {
     if(PopUpAlert){Alert(Symbol()," ","Buy Arrow");}
     if(EmailAlert){SendMail(Symbol()+" Buy Arrow"+"","Buy Signal");}
     if(PushAlert){SendNotification(Symbol()+" Buy Arrow"+"");}
     CTime=Time[0];
    }
  }
  if(Stoch1<Level && Stoch3<Level && ( Stoch2>Level || Stoch4>Level ))
  {
   DOWN[i]=High[i]+distance*MyPoint;
   UP[i]=EMPTY_VALUE;
   if(CTime!=Time[0])
    {
     if(PopUpAlert){Alert(Symbol()," ","Sell Arrow");}
     if(EmailAlert){SendMail(Symbol()+" Sell Arrow"+"","Sell Signal");}
     if(PushAlert){SendNotification(Symbol()+" Sell Arrow"+"");}
     CTime=Time[0];
    }
  }
 
Keith Watford:
Is this more like what you are looking for?

  if(Stoch1>Level && Stoch3>Level  && ( Stoch2<Level || Stoch4<Level  ))
  {
   UP[i]=Low[i]-distance*MyPoint;
   DOWN[i]=EMPTY_VALUE;
   if(CTime!=Time[0])
    {
     if(PopUpAlert){Alert(Symbol()," ","Buy Arrow");}
     if(EmailAlert){SendMail(Symbol()+" Buy Arrow"+"","Buy Signal");}
     if(PushAlert){SendNotification(Symbol()+" Buy Arrow"+"");}
     CTime=Time[0];
    }
  }
  if(Stoch1<Level && Stoch3<Level && ( Stoch2>Level || Stoch4>Level ))
  {
   DOWN[i]=High[i]+distance*MyPoint;
   UP[i]=EMPTY_VALUE;
   if(CTime!=Time[0])
    {
     if(PopUpAlert){Alert(Symbol()," ","Sell Arrow");}
     if(EmailAlert){SendMail(Symbol()+" Sell Arrow"+"","Sell Signal");}
     if(PushAlert){SendNotification(Symbol()+" Sell Arrow"+"");}
     CTime=Time[0];
    }
  }
awsome yes this is ok now thank u very much Mr Keith
 
Write self-documenting code
if(Stoch1>Level && Stoch3>Level  && ( Stoch2<Level || Stoch4<Level  ))
so you can understand it next week.
bool  isSignal = Stoch1>Level && Stoch3>Level;
bool wasSignal = Stoch2>Level && Stoch4>Level;
if(isSignal && !wasSignal)
Reason: