• Get $30 off VIP with code SUMMER30. Ends July 27. Happy trading!

Combine and normalized buy sell pressure indicator request


I am testing several volume based indicators. Can someone be so kind to combine the following oscillator with several default TOS scripts for me?

The Buy Sell Pressure v2 oscillator would be combined and normalized with the following TOS scripts, with options to turn them on or off preferably. Also, can Buy Sell Pressure v2 be made to work with tick charts?

I would like to see the Chaikin Money Flow, Chaikin Oscillator, Volume Flow Indicator, and Ease of Movement combined with it with options to turn them on or off.

Tomsk already normalized the two Chaikin's for me here https://usethinkscript.com/threads/trade-volume-delta-indicator-for-thinkorswim.524/ at post 16 with Cumulative delta but I like to trade intraday, and it didn't work for intraday timeframes.

Any other useful volume-based scripts would be welcome to add and test, if the coder had any ideas of their own.

Here are the studies I would like combined with the prior linked study up above.
# Archive Name: Buy Sell Pressure v2 Mobius

# Archive Section: Volume

# Suggested Tos Name: BuySellPressure_v2_Mobius

# Archive Date: 5.06.2018

# Archive Notes: Includes label added by AI

# Buy Sell Pressure

# Mobius

# Mobius at MyTrade

# V01.01.2011

declare lower;

input detrend = 9;

input inertiaS = 26;

input smoothing = 5;

rec BuyV  = if close > close[detrend] then volume else 1;

rec SellV = if close < close[detrend] then -volume else 1;

def BP = (BuyV / (BuyV + SellV));

def SP = (SellV / (SellV + BuyV));

plot Data = Average(Inertia(BP - SP, inertiaS), smoothing);



Data.DefineColor("Positive and Up", Color.DARK_GREEN);

Data.DefineColor("Positive and Down", Color.LIGHT_RED);

Data.DefineColor("Negative and Down", Color.DARK_RED);

Data.DefineColor("Negative and Up", Color.LIGHT_GREEN);

Data.AssignValueColor(if Data >= 0 then if Data > Data[1] then Data.Color("Positive and Up") else Data.Color("Positive and Down") else if Data < Data[1] then Data.Color("Negative and Down") else Data.Color("Negative and Up"));

plot zeroLine = 0;

# End Code

# AI - got code for label from other Mobius study

def c = close(priceType = "Last");

def A = close(priceType = "Ask");

def B = close(priceType = "Bid");

def v = if IsNaN(volume) then v[1] else volume;

def BSPUp;

def BSPDn;

BSPUp = if close >= A

    then v

    else BSPUp[1];

BSPDn = if close <= B

    then -v

    else BSPDn[1];

def BSP = ((v - BSPDn) / (BSPUp - BSPDn)) * 100;

AddLabel(1, "1-Bar Buy/Sell Pressure = " + BSP,

    if BSP > 100 then Color.LIGHT_GREEN

    else if BSP < 100then Color.RED

    else Color.CYAN);

Here is the volume flow indicator...

# TD Ameritrade IP Company, Inc. (c) 2007-2018

declare lower;

input length = 130;
input maxVolumeCutOff = 2.5;

assert(maxVolumeCutOff > 0, "'max volume cut off' must be positive: " + maxVolumeCutOff);

def cutOff = 0.2 * stdev(log(hlc3) - log(hlc3[1]), 30) * close;
def hlcChange = hlc3 - hlc3[1];
def avgVolume = Average(volume, 50)[1];
def minVolume = Min(volume, avgVolume * maxVolumeCutOff);
def dirVolume = if hlcChange > cutOff
    then minVolume
    else if hlcChange < -cutOff
        then -minVolume
        else 0;

plot VFI = ExpAverage(sum(dirVolume, length) / avgVolume, 3);
plot ZeroLine = 0;


Here is ease of movement...
# TD Ameritrade IP Company, Inc. (c) 2007-2019

declare lower;

input colorNormLength = 14;
input smLength = 14;

def mfi = if volume > 0 then (high - low) / volume * 100 else 0;
def mul = 50 * mfi * ((high + low) - (high[1] + low[1]));

plot EOM = Average(mul, smLength);
plot ZeroLine = 0;

EOM.DefineColor("Highest", Color.YELLOW);
EOM.DefineColor("Lowest", Color.LIGHT_RED);
EOM.AssignNormGradientColor(colorNormLength, EOM.color("Lowest"), EOM.color("Highest"));
Last edited by a moderator:


First time seeing that buy/sell pressure indicator. What does the label "1-bar buy/sell pressure=#" mean? Below 100 = great sell pressure? Above 100 greater buy pressure? Turns red = sell? turns blue = buy?

Similar threads