Thanks for your reply.
Correct, the example is using swing in a strategy, sorry I did not clarify this to you.
If you look at the code, you can duplicate most everything in an indicator except the line AddChartIndicator(mySwing); which only works in a strategy. This function is only add the swing to the chart when the strategy loads, so it is a convienience feature. For your indicator, you would need to add the swing indicator if you wish to see the display.
Also, to only show the current results add this as the first line in OnBarUpdate():
if (State != State.Realtime) return;
That line will skip all of the historical data so the first bar close in real-time will show the swing results of the current swing,

Comment