My coding skills are pretty rusty. Can someone find the error in the recursive method HighIn().
private int firstRun=0; protected override void OnBarUpdate(){ if(firstRun<15){ firstRun++; return; } Print(HighIn(3)); } private double HighIn(int bars){ if(bars <= 2){ return High[bars]; } double value = HighIn(bars--); if(value>High[bars]){ return value; }else{ return High[bars]; } }
Comment