Koalafied Volume Extension For ThinkOrSwim

lovetoloughlouder

New member
VIP
Hello ThinkScripters, I need a favor if you can create a thinksript code for one of Tradingviews indicator (Koalafied Volume Extension).
https://www.tradingview.com/script/MGa2XVAf-Koalafied-Volume-Extension/

I have been watching and testing it for a while and seems very helpful with the super Trend indicator specially for intraday trading, I really appreciate your time and Thank you in advance

NOTE : The colors White and Yellow are marking the high volume.
1688692650981.png
 
Last edited by a moderator:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Hello ThinkScripters, I need a favor if you can create a thinksript code for one of Tradingviews indicator (Koalafied Volume Extension).
https://www.tradingview.com/script/MGa2XVAf-Koalafied-Volume-Extension/

I have been watching and testing it for a while and seems very helpful with the super Trend indicator specially for intraday trading, I really appreciate your time and Thank you in advance . this is the code from Trading View

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © TJ_667
//@version=5
indicator("Koalafied Volume Extension", overlay = true)
// ---------- FUNCTIONS ---------- //

Z_score(_src, _length, MA_sel)=>
_mean = MA_sel == 'SMA' ? ta.sma(_src, _length) : MA_sel == 'EMA' ? ta.ema(_src, _length) : MA_sel == 'WMA' ? ta.wma(_src, _length) : na
_value = (_src - _mean) / (ta.stdev(_src-_mean, _length))
// ---------- INPUTS ---------- //
var GRP1 = "INPUTS"
len = input(21, "Z-Score MA Length", group = GRP1)
MA_sel = input.string(title='MA Selection', defval='SMA', options=['SMA', 'EMA', 'WMA'], group = GRP1)
deviation_1 = input(2.0, "Std Dev", group = GRP1)
deviation_2 = input(3.0, "Std Dev", group = GRP1)
rising_sel = input(false, "Colour rising volume bars", group = GRP1)
var GRP2 = "COLOR SELECTION"
_colup_ext2 = input.color(color.lime, "Bull Extension 2", group = GRP2)
_colup_ext1 = input.color(color.blue, "Bull Extension 1", group = GRP2)
_coldown_ext1 = input.color(color.red, "Bear Extension 1", group = GRP2)
_coldown_ext2 = input.color(color.purple, "Bear Extension 2", group = GRP2)
col_risingUP = input.color(color.white, "Rising Candle Color Up", group = GRP2)
col_risingDOWN = input.color(color.gray, "Rising Candle Color Down", group = GRP2)
col_blank = input.color(color.new(color.black,100), "Blank Candle Color", group = GRP2)

// ---------- CALCS ---------- //
src = volume
vol = Z_score(src, len, MA_sel)
extension_1 = vol > deviation_1 and vol < deviation_2
extension_2 = vol > deviation_2
bull = close > open
bear = close < open
rising = volume > volume[1]
rising_col = close > open and rising ? col_risingUP : close < open and rising ? col_risingDOWN : col_blank
_devUp2 = extension_2 and bull
_devUp1 = extension_1 and bull
_devDown1 = extension_1 and bear
_devDown2 = extension_2 and bear
// ---------- PLOTS ---------- //
barcolor(_devUp1 ? _colup_ext1 : _devDown1 ? _coldown_ext1 : na, title = "Extension 1")
barcolor(_devUp2 ? _colup_ext2 : _devDown2 ? _coldown_ext2 : na, title = "Extension 2")
barcolor(not extension_1 and not extension_2 and not rising_sel ? col_blank : not extension_1 and not extension_2 and rising_sel ? rising_col : na, title = "Rising/Falling")
// ---------- Alerts ---------- //
ext_alert = _devUp2 or _devUp1 or _devDown1 or _devDown2
alertcondition(ext_alert, "Volume Extension Alert", "VOL EXT")


NOTE : The colors White and Yellow are marking the high volume.
View attachment 19075
try this

CSS:
#// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
#// © TJ_667
#indicator("Koalafied Volume Extension", overlay = true)
# Converted by Sam4Cok@Samer800    -07/2023

input zScoreMaLength = 21;#, "Z-Score MA Length", group = GRP1)
input maSelection = AverageType.SIMPLE;
input StdDev1 = 2.0;#, "Std Dev", group = GRP1)
input StdDev2 = 3.0;#, "Std Dev", group = GRP1)
input ColourRisingvolumeBars = no;#, "Colour rising volume bars", group = GRP1)

def na = Double.NaN;
#// ---------- CALCS ---------- //
def src = volume;
def mean = MovingAverage(maSelection, src, zScoreMaLength);
def dev = StDev(src - mean, zScoreMaLength);
def vol = (src - mean) / dev;

def extension_1 = vol > StdDev1 and vol < StdDev2;
def extension_2 = vol > StdDev2;
def bull = close > open;
def bear = close < open;

def rising = volume > volume[1];
def rising_col = if bull and rising then 1 else
                 if bear and rising then -1 else 0;

def _devUp2 = extension_2 and bull;
def _devUp1 = extension_1 and bull;
def _devDown1 = extension_1 and bear;
def _devDown2 = extension_2 and bear;

AssignPriceColor(if !extension_1 and !extension_2 and !ColourRisingvolumeBars then Color.CURRENT else
                 if !extension_1 and !extension_2 and ColourRisingvolumeBars then
                 if rising_col>0 then Color.WHITE else
                 if rising_col<0 then Color.GRAY else Color.CURRENT else Color.CURRENT);

AssignPriceColor(if _devUp2 then Color.CYAN else
                 if _devDown2 then Color.MAGENTA else Color.CURRENT);

AssignPriceColor(if _devUp1 then Color.BLUE else
                 if _devDown1 then Color.PLUM else Color.CURRENT);
#-- END of CODE
 
  • Love
Reactions: IPA
try this

CSS:
#// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
#// © TJ_667
#indicator("Koalafied Volume Extension", overlay = true)
# Converted by Sam4Cok@Samer800    -07/2023

input zScoreMaLength = 21;#, "Z-Score MA Length", group = GRP1)
input maSelection = AverageType.SIMPLE;
input StdDev1 = 2.0;#, "Std Dev", group = GRP1)
input StdDev2 = 3.0;#, "Std Dev", group = GRP1)
input ColourRisingvolumeBars = no;#, "Colour rising volume bars", group = GRP1)

def na = Double.NaN;
#// ---------- CALCS ---------- //
def src = volume;
def mean = MovingAverage(maSelection, src, zScoreMaLength);
def dev = StDev(src - mean, zScoreMaLength);
def vol = (src - mean) / dev;

def extension_1 = vol > StdDev1 and vol < StdDev2;
def extension_2 = vol > StdDev2;
def bull = close > open;
def bear = close < open;

def rising = volume > volume[1];
def rising_col = if bull and rising then 1 else
                 if bear and rising then -1 else 0;

def _devUp2 = extension_2 and bull;
def _devUp1 = extension_1 and bull;
def _devDown1 = extension_1 and bear;
def _devDown2 = extension_2 and bear;

AssignPriceColor(if !extension_1 and !extension_2 and !ColourRisingvolumeBars then Color.CURRENT else
                 if !extension_1 and !extension_2 and ColourRisingvolumeBars then
                 if rising_col>0 then Color.WHITE else
                 if rising_col<0 then Color.GRAY else Color.CURRENT else Color.CURRENT);

AssignPriceColor(if _devUp2 then Color.CYAN else
                 if _devDown2 then Color.MAGENTA else Color.CURRENT);

AssignPriceColor(if _devUp1 then Color.BLUE else
                 if _devDown1 then Color.PLUM else Color.CURRENT);
#-- END of CODE
@samer800 , really appreciate for taking time to do this, I will apply and start looking at it. and will let you know. Thank you very very much.
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
393 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top