I have written an EFS that looks at the most recent trade size, and, then, depending if it was at the bid or the ask, adding that trade size to (or subtracting it from) a running total of volume (TotVol). The EFS then plots a histogram of TotVol.
It works great real-time.
I know the function getMostRecentTradeSize() does not access historical data, but it does something funky, and I want to know the smartest way to fix this.
When I first open the chart, the EFS creates a histogram for prior data bars, based on the trade size of the most recent trade and this is erroneous, since it's just a running addition (or subtraction) of the most recent trade size onto itself. This is done for each bar up to the current (now) bar.
What's the smartest way to have this indicator not populate a histogram for the back data? Or, what's the smartest way to have this variable TotVol re-set to zero only the first the EFS is turned on?
I hope this is clear.
JOHN
It works great real-time.
I know the function getMostRecentTradeSize() does not access historical data, but it does something funky, and I want to know the smartest way to fix this.
When I first open the chart, the EFS creates a histogram for prior data bars, based on the trade size of the most recent trade and this is erroneous, since it's just a running addition (or subtraction) of the most recent trade size onto itself. This is done for each bar up to the current (now) bar.
What's the smartest way to have this indicator not populate a histogram for the back data? Or, what's the smartest way to have this variable TotVol re-set to zero only the first the EFS is turned on?
I hope this is clear.
JOHN
Comment