Buying and Selling Pressure Custom Column


Category:
0
0

Hi Pete,
You helped me with the Buying & Selling Pressure scan here: Buying and Selling Pressure Scan – Hahn-Tech, LLC. Can it be tweaked for a custom column showing the pct? I would like Buying to be in Green and Selling in Red like in the picture.

Thanks again!

Attachments:
Marked as spam
Posted by (Questions: 8, Answers: 18)
Asked on May 8, 2024 8:31 am
72 views
0
Private answer

I think this should do it:

def buyingPreassure = volume * (close - low) / (high - low);
def sellingPreassure = volume * (high - close) / (high - low);
def totalVolume = buyingPreassure + sellingPreassure;
def buyingPreassurePercent = Round(buyingPreassure / totalVolume * 100, 1);
def sellingPreassurePercent = Round(sellingPreassure / totalVolume * 100, 1);
AddLabel(yes, if buyingPreassure > sellingPreassure then Concat("Buy %: ", buyingPreassurePercent) else Concat("Sell %: ", sellingPreassurePercent), if buyingPreassure > sellingPreassure then Color.GREEN else Color.RED);

Marked as spam
Posted by (Questions: 37, Answers: 4116)
Answered on May 8, 2024 8:39 am