Calculate EMA ignoring Zero


My indicator throws values when conditions are met otherwise it gives zero. I want to plot EMA on this indicator by ignoring zero values. Hence EMA value remains unchanged or EMA line remains visible and flat when Zero appears. Can you please guide how I can do this? Zero can come on n number of continuous days depending on the conditions / trend. I am fairly new to AFL too.

Read here and here.

/// @link
/// @link
indicator = /*YOUR ARRAY HERE*/;
period = 50;
only_when = indicator > 0; 
x = SparseCompress(only_when, indicator); // compact sparse data
y = SparseExpand(only_when, EMA(x, period)); // expand sparse data
//y = ValueWhen(only_when, y);

Plot( C, "Price", colorDefault, styleBar );
Plot( y, "Sparse EMA from Array>0", colorRed );

What do I need to write in the first line- "Your Array here"? My indicator is multi line code and it is plotted as histogram. EMA will be on top of this.

FYI, @Tomasz (the AB developer) has marked 2nd post as solution.
Then you (the newbie) removed it which is kind of affront since it is like labeling Tomasz and me as being incompetent and post #2 being incorrect. 2nd affront... not a single thank you for taking the time. Instead next (helpless) demand.
Not a good start.

So since you seem to be the expert here... what do you think is supposed to be correct code in 2nd post and what is supposed to be inserted into

indicator = /*YOUR ARRAY HERE*/;

Which variable do you insert into Plot() function when you plot your indicator, hm? Which one?

BTW, as No.1 expert you most probably have read following one (entirely) before, right?