I use following code to test CrossAbove of Stochastics.K/Stochastics.D and MACD.Value/MACD.Avg, but it does not work because the condition logic always produces FALSE.
private MACD mACD;
private Stochastics stochastics;
mACD = MACD(12, 26, 9);
stochastics = Stochastics(3, 14, 7);
if (CrossAbove(mACD.Value, mACD.Avg, 1))
{
......
}
if (CrossAbove(stochastics.K, stochastics.D, 1))
{
......
}
Would you please tell me the correct code to do this?
Thanks,
weiwei
Comment