Waddah Attar Explosion With Volume for ThinkOrSwim

Sesqui

Member
VIP
I really enjoyed using the Waddah Attar Explosion (WAE) indicator posted on this forum here, WAE for TOS, and since several replies to the post for that indicator asked about a WAE with volume, I made this variant incorporating volume in the analysis.

To incorporate volume it uses the following:
Value = (MACD value - Previous MACD value) * Volume
BollingerBandUpper - BollingerBandLower + Average(Volume,VolAvgLength)/sensitivity;

Here is a screenshot showing what it looks like:

1772495833430.png


Here is the code:

CSS:
#------------- "Waddah Attar Explosion With Volume" ------------#

declare on_volume;
input sensitivity   = 150; #"Sensitivity"
input fastLength    = 20; #"FastEMA Length"
input slowLength    = 40; #"SlowEMA Length"
input channelLength = 20; #"BB Channel Length"
input mult          = 2.0; #"BB Stdev Multiplier"
input deadZone      = 20; #"No trade zone threshold"
input VolAvgLength  = 20;

script calc_macd {

    input source = close;
    input fastLength = 20;
    input slowLength = 40;

    def fastMA =  ExpAverage(source, fastLength);
    def slowMA =  ExpAverage(source, slowLength);

    plot out = fastMA - slowMA;

}# end script calc_macd{}

script calc_BBUpper {

    input source = close;
    input length = 20;
    input mult = 2.0;

    def basis = SimpleMovingAvg(source, length);
    def dev = mult * StDev(source, length);

    plot out = basis + dev;

}# end script calc_BBUpper{}

script calc_BBLower {

    input source = close;
    input length = 20;
    input mult = 2.0;

    def basis = SimpleMovingAvg(source, length);
    def dev = mult * StDev(source, length);

    plot out = basis - dev;

}# end script calc_BBLower{}

def e1 = (calc_BBUpper(close, channelLength, mult) - calc_BBLower(close,
         channelLength, mult)) + Average(Volume,VolAvgLength)/sensitivity;

def t1_ = (calc_macd(close, fastLength, slowLength) - calc_macd(close[1],
         fastLength, slowLength))*VOLUME ;

def t1 = if t1_ > 2*e1 then 2*e1 else if t1_ < -2*e1 then -2*e1 else t1_;

def trendUp = if t1 >= 0 then t1 else 0;
def trendDown = if t1 < 0 then (-1 * t1) else 0;

plot tUp = trendUp; #"UpTrend"
#Also try using columns to see how it looks.
tUp.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
tUP.SetLineWeight(5);
tUp.AssignValueColor(if trendUp < trendUp[1] then Color.LIGHT_GREEN else
Color.GREEN);

plot tDn = trendDown; #"DownTrend"
tDn.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
tDn.SetLineWeight(5);
tDn.AssignValueColor(if trendDown < trendDown[1] then Color.ORANGE else
Color.RED);

plot ex = e1; #"ExplosionLine"
ex.SetDefaultColor(Color.BLACK); #
ex.SetLineWeight(2);
ex.HideBubble();

#plot xLine = deadZone; #"DeadZoneLine"
#xLine.SetDefaultColor(Color.BLUE);

#------------- "Waddah Attar Explosion " ------------#
 

Attachments

  • 1772495281930.png
    1772495281930.png
    166.5 KB · Views: 27
Last edited:

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

Thread starter Similar threads Forum Replies Date
BenTen Potential Explosion Indicator for ThinkorSwim Custom 11

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
1172 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