This indicator simulates an OnBalanceVolume indicator for markets that don't provide volume directly in thinkorswim script. Uses a constant to simulate the total
option value each trading day. The formula is the same as the one for the OnBalanceVolume indicator created by Joseph Granville. Plots an average of the accumVol variable. Above 100000 the price is trending up, below 100000 the price is trending down. I created this specifically for day trading the XSP ticker, 0DTE. I'll use it in
conjunction with Fast Stochastics to get a directional bias for the day. Looking at the plot and historical XSP values for different time frames it seems like it can
be useful.
option value each trading day. The formula is the same as the one for the OnBalanceVolume indicator created by Joseph Granville. Plots an average of the accumVol variable. Above 100000 the price is trending up, below 100000 the price is trending down. I created this specifically for day trading the XSP ticker, 0DTE. I'll use it in
conjunction with Fast Stochastics to get a directional bias for the day. Looking at the plot and historical XSP values for different time frames it seems like it can
be useful.
Code:
# OnBalanceOptionsVolume #
# Script by LetsMakeMoney #
# Free for General Use #
# Use at your own risk #
# This indicator simulates an OnBalanceVolume indicator for
# markets that don't provide volume directly in
# thinkorswim script. Uses a constant to simulate the total
# option value each trading day. The formula is the same as
# the one for the OnBalanceVolume indicator created by
# Joseph Granville. Plots an average of the accumVol variable.
# Above 100000 the price is trending up, below 100000 the
# price is trending down (when using the default value of
# 100000). I created this specifically for
# day trading the XSP ticker, 0DTE. I'll use it in
# conjunction with Fast Stochastics to get a directional
# bias for the day. Looking at the plot and historical
# XSP values for different time frames it seems like it can
# be useful.
declare lower;
input length = 14;
input OptionVolume = 100000;
def OV = OptionVolume;
plot accumVol = if close > close[1] then OV[1] + OV else if close==close[1] then OV[1] else OV[1] - OV;
accumVol.Hide();
def AccumVolAvg = ExpAverage(accumVol,length);
plot ACV = AccumVolAvg;
ACV.SetDefaultColor(color.gray);
plot line100 = 100000;
line100.SetDefaultColor(color.gray);
Last edited: