guess I have a stupid question, but I am not that experienced in building classes.
I have a working method and I try to put this method into a class. Everything works fine till I get to the line with the ZZ Indicator.
private Indicator Indicator = new Indicator();
public void DefineZigZag(){
Indicator.Log("Test Begin",LogLevel.Information);
int ZZhigh_ago = Indicator.ZigZag(DeviationType.Points, 0.1, true).HighBar(0, 1, 100);
int ZZlow_ago = Indicator.ZigZag(DeviationType.Points, 0.1, true).LowBar(0, 1, 100);
Indicator.Log("Test End",LogLevel.Information);
double ZZhighValue = Indicator.ZigZag(DeviationType.Points, 0.1, true).ZigZagHigh[ZZhigh_ago];
double ZZlowValue = Indicator.ZigZag(DeviationType.Points, 0.1, true).ZigZagLow[ZZlow_ago];
}
~Class_ZZ_Test() { }
}
int ZZhigh_ago = Indicator.ZigZag(DeviationType.Points, 0.1, true).HighBar(0, 1, 100);
throws an exception, which is so hard, that I have to use try / catch. Otherwise NT 8 crash.
What is my mistake? Is it not possible to call the ZZ Indicator inside a class?
Thanks for your help
uupsa
Comment