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))
}