The "bad tick" that appears on this bar is entered from your BarsType logic. When debugging BarsTypes, it is important to have prints added before every call to UpdateBar and every call to AddBar to see exactly how your BarsType is building its bars.
To look into this further, I suggest adding prints to show exactly what is being entered in each UpdateBar and AddBar call before that call is made. I suggest noting the line in which the call is made, as well. (Since I added print lines to the script in my example prints, these numbers will not be in line with yours.)
I.E.
Print(string.Format("Update Bar (92): Time: {0} H: {1} L: {2} C: {3} Added V: {4}", time, barHigh, barLow, lastPrice, 0));
UpdateBar();
...
Print(string.Format("Add Bar (95): Time: {0} O: {1} H: {2} L: {3} C: {4} Added V: {5}", time, open, open, open, open, volume/4));
AddBar();
Update Bar (92): Time: 6/19/2019 4:01:00 PM H: 2934 L: 2930 C: 2878 Added V: 0
Add Bar (95): Time: 6/19/2019 4:01:00 PM O: 2930.75 H: 2930.75 L: 2930.75 C: 2930.75 Added V: 196
Please let us know if we can be of further assistance.

Comment