Hi, I want to find the Moving Average. But some candle on my chart is same value for OHLC AND Volume is 0 (mean the stock is suspended).

here I wrote a formula, it's fine if the suspended candle 1, but it's not work if have some suspended candle for several days

```
Suspend = H == L AND V == 0; // suspended bar
ValidBar[ 0 ] = Close[ 0 ];
for( i = 0; i < BarCount; i++ )
{
if(Suspend[i])
ValidBar[i] = 0;
else
ValidBar [i] = Close [i];
}
function MVA ( x ){
n = Sum(ValidBar<1,x);
Periode = x + n;
SumVB = Sum(ValidBar,SelectedValue(Periode));
return SUMVB / x;
}
MA20 = MVA(20);
```

here is example chart

thank you