First thing I want to say is that the code you included with your question is not written very well. When you load that into a new indicator and click the verify button it produces 3 warnings. It works. But there is room for improvement.
The next thing I will tell you is that the solution you are seeking has nothing to do with the code itself. In fact you can not even address this issue by modifying the code. The solution is a setting, which is something you can adjust for any plot on any indicator you add to a chart on TradeStation.
The setting is found in the "Chart Style" section of "Indicator Properties" and the setting is named "Don't automatically connect plot lines".
You can read about that setting here:
But I will also include two screenshots below so you can see where that setting is located and you can see the impact that setting has on the chart.