i have a multi timeframe strategy and get error when i use countif
07/05/2009 4:59:34 PM Strategy Error on calling 'OnBarUpdate' method for strategy 'forexZLR': 'CountIf' can't be run on multi series strategies.
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]private[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]bool[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] IsADXTrending()
{
[/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]// check if adx is trending
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]bool[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] _ADXTrending = [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]true[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (CountIf([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]delegate[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] { [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]return[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] ADX(14)[1] < ADX(14)[2]; }, 3) >= 3)
{
_ADXTrending = [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
}
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]else
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]{
_ADXTrending = [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]true[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];
}
[/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]return[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] _ADXTrending;
}
[/SIZE]


, I mean putting the NOT part in bold red was distracting. Nobody ever pays attention to bold red. Try to pick up the slack eh Josh. I mean really, bold red? Try to come up with something that might get people's attention, lol.
Comment