Thanks for your reply.
Glad that is meeting your needs.
When a script loads, it will process every bar starting with the very first historical bar and will go through them one at a time. Each bar will activate the OnBarClose() method and the script will color the bar transparent.
As you only wanted the currently forming bar to be transparent I added the chack to see if it was real-time data (rather than coloring all the historical bars transparent and then recoloring them).
So this means only the real-time bar gets set to transparent. Once that bar closes it gets recolored according to the relationship of Close to open price of the bar.
Comment