if ( CurrentBar < 40 ) return;
Avg.Set( ( avg1 + avg2 ) / 2 );
Value.Set( VMA(Avg,6,6)[0] );
............
Avg plots fine if I comment out the Value.Set line...so the rest of the code is not causing the error
Print( VMA(Avg,6,6)[0] ); outputs 'NaN' as a value. which is why the Log error....
Question is why a 6 VMA does not calculate a value when the are > 40 bars in the chart
Comment