View Single Post
  #113 (permalink)  
Old 04-20-2007, 05:27 AM
C.E.O.'s Avatar
C.E.O. C.E.O. is offline
Member
 
Join Date: Nov 2006
Posts: 90
C.E.O. is on a distinguished road
cja,
I would like to ask your help on something. I have taken digistochs code and am wanting to add an alert function to it, and maybe when you release(if) source for stochs bar, do the same. I am pretty new at this coding business and have trouble with alerts going off at every tick. The following is what I have and am not sure if it will work, but i would like an alert for one per bar of the current chart timeframe. Could you please give me a hand on this? Your help would be greatly appreciated.

PHP Code:
if (AlertOnAllignment == true)
   
   {
    if (
StochsToAllign == 2
    
//up trend 2 alligned
    
{if  ((stoch_color_m15 == YellowGreen && stoch_color_m30 == YellowGreen) || 
         (
stoch_color_m15 == YellowGreen && stoch_color_h1 == YellowGreen) ||
         (
stoch_color_m15 == YellowGreen && stoch_color_h4 == YellowGreen) || 
         (
stoch_color_m30 == YellowGreen && stoch_color_h1 == YellowGreen) ||
         (
stoch_color_m30 == YellowGreen && stoch_color_h4 == YellowGreen) || 
         (
stoch_color_h1 == YellowGreen && stoch_color_h4 == YellowGreen))
         
     
//Down trend 2 alligned
    
else if  ((stoch_color_m15 == Tomato && stoch_color_m30 == Tomato) || 
         (
stoch_color_m15 == Tomato && stoch_color_h1 == Tomato) ||
         (
stoch_color_m15 == Tomato && stoch_color_h4 == Tomato) || 
         (
stoch_color_m30 == Tomato && stoch_color_h1 == Tomato) ||
         (
stoch_color_m30 == Tomato && stoch_color_h4 == Tomato) || 
         (
stoch_color_h1 == Tomato && stoch_color_h4 == Tomato))    
     }    
         
   if (
StochsToAllign == 3)
   
//up trend 3 alligned
   
{if  ((stoch_color_m15 == YellowGreen && stoch_color_m30 == YellowGreen && stoch_color_h1 == YellowGreen) || 
        (
stoch_color_m15 == YellowGreen && stoch_color_m30 == YellowGreen && stoch_color_h4 == YellowGreen) ||
        (
stoch_color_m30 == YellowGreen && stoch_color_h1 == YellowGreen && stoch_color_h4 == YellowGreen))
   
   
//Down trend 3 alligned
   
else if  ((stoch_color_m15 == Tomato && stoch_color_m30 == Tomato && stoch_color_h1 == Tomato) || 
        (
stoch_color_m15 == Tomato && stoch_color_m30 == Tomato && stoch_color_h4 == Tomato) ||
        (
stoch_color_m30 == Tomato && stoch_color_h1 == Tomato && stoch_color_h4 == Tomato))
   }
   
   if (
StochsToAllign == 4)
   
//up trend All alligned     
   
{if  ((stoch_color_m15 == YellowGreen && stoch_color_m30 == YellowGreen && stoch_color_h1 == YellowGreen && stoch_color_h4 == YellowGreen))    
   
//Down trend All alligned     
   
else if  ((stoch_color_m15 == Tomato && stoch_color_m30 == Tomato && stoch_color_h1 == Tomato && stoch_color_h4 == Tomato))    
   } 
Reply With Quote