Waddah Attar Explosion Indicator for ThinkorSwim

BenTen

Administrative
Staff member
Staff
VIP
Lifetime
From the author:
Here is the Waddah Attar Explosion Indicator. It indicates possible explosion depending on two indicators (Bollinger & MACD). With this indicator, you can discover when the price explosion starts and when it ends

Here it is converted by Syracusepro to ThinkorSwim. I also found this indicator on MQL5 as well.

GLcO2Rm.png


Some notes I found:

From looking at the code, it looks like an mix between Standard MACD and iBands Displayed as a seperate window flat indicator. So the Green and Red lines correspond with MACD. The Sienna line looks like it indicating the explosive price power. The Blue line indicated the dead zone - no trade. All logic seems to be looking at the Close price. So Green is Buy and Red is Sell. If Green is above Blue and Siena - Signal Buy. If Red is above Blue and Siena - Signal Sell. Exit the Open Buy when Green goes below Blue Dead Zone. Exit the Open Sell when Red goes below Blue Dead Zone.

thinkScript Code

Rich (BB code):
declare lower;

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

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"

script calc_macd{

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

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

    plot out = fastMA - slowMA;

}

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;

}

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;

}

def t1 = (calc_macd(close, fastLength, slowLength) - calc_macd(close[1],
fastLength, slowLength)) * sensitivity;

def t2 = (calc_macd(close[2], fastLength, slowLength) -
calc_macd(close[3], fastLength, slowLength)) * sensitivity;

def e1 = (calc_BBUpper(close, channelLength, mult) - calc_BBLower(close,
channelLength, mult));

#//
def e2 = (calc_BBUpper(close[1], channelLength, mult) - calc_BBLower(close[1], channelLength, mult));

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.assignValueColor(if trendUp < trendUp[1] then color.light_GREEN else
color.green);

plot tDn = trendDown; #"DownTrend"
tDn.setpaintingStrategy(paintingStrategy.HISTOGRAM);
tDn.assignValueColor(if trendDown < trendDown[1] then color.orange else
color.red);

plot ex = e1; #"ExplosionLine"
ex.setdefaultColor(createColor(160, 82, 45));

plot xLine = deadZone; #"DeadZoneLine"
xLine.setdefaultColor(color.blue);

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

Shareable Link

https://tos.mx/BM3O4c
 
Last edited by a moderator:
This is a Awesome Indicator. I have seen it on MT4 Platform and lot of Forex Trader use it. Just try it on my TOS but don't plot anything on FOREX Pair... Only plot it on STOCKS. But it should plot it on anything. Since I do Binary I need to see it on FOREX PAIR. Thank you.
 
Last edited:
@Topas Glad to hear positive feedback about it. Is it still the same version as the one on MT4? Any differences or anything missing in the ToS version?

 
Last edited:
Hi Ben... I truly appreciate for this post. May I know is there a way to make the indicator auto-adjust the range instead of fix one ? I'm not sure how to do it. Can't find the setting.
 
@SolidChiken What do you mean by that? By the way, I don't think this is truly the complete converted version. It's similar to the original version but not to the exact. I do not use it either.
 
@BenTen The histogram is small (low) on certain ticker. Not visible even after zoom in. It has a fixed scale. When I'm home today will show you the chart what I was talking about.
Btw, is there a chance for you to show the original version?
 
@SolidChiken By original I meant the one that works on the MQL5 platform. It’s linked above as well.

If you have trouble seeing the histogram then unplot the deadzone.
 
@BenTen

Looking at the code looks like it does not include the volume part of the indicator. MACD bar height should be determined in part by volume from my understanding of the indicator. Still looks like it works very well though.
 
https://usethinkscript.com/threads/waddah-attar-explosion-indicator-for-thinkorswim.83/#post-377
From the author .

"Here is a new indicator which I programed, it gives an explosion signal depending on two indicators (Bollinger & MACD). With this indicator you can discover when the price explosion starts and when it ends

The indicator is designed to work with H1 frame only. How to use the indicator:

1) The yellow line is used to recognize when the explosion starts and when it ends. the explosion starts when the yellow line is low as long as the yellow line is high the explosion is still running on the price explosion ends when the yellow line is back low inside the dots zone the yellow line job is identifying the explosion starts and ends.
2) The green histogram: has three uses: first, gives a signal when price explose upward (bullish move) second, gives the buying signal, when the green histo rises above the yellow line. third, gives the exist signal, when the a green histo slip back into the yellow line
3)The green histogram: has three uses:
  • first, gives a signal when price explose downward (bearish move)
  • second, gives the sell signal, when the red histo rises above the yellow line
  • third, gives the exist signal, when the red histo slip back into the yellow line
I hope that you will like the indicator. I added some properties so the indicator would be more sensitive and can be used with all pairs:

  • sensitive property
  • DeadZonePip property which represents for the pips move inside the dead zone (the zone between the dots line)
  • BandPeriod property which represent the sensitive of the yellow line
  • BandDivision property helpful value for the explosion (for yellow line)
  • showlong property to show or hide the green histo
  • showshort property to show or hide the red histo
  • showexplosion property to show or hide the yellow line
  • showdeadzone property to show or hide the dead zone (dots zone)

Explanation for the Price Explosion indicator:

The indicator depends on two things to show the data and the lines in chart

1) The deference between the upper and lower band of the Bollinger band which tight when the price fluctuates (narrow move) when the difference between the bands expand, the explosion process starts and the yellow line curve upward till the explosion ends and price fluctuate again
2) The difference between the present value of the macd and the last value with one tick for the same candle this deference is represented in the green and the red histogram.

END"
 
Last edited by a moderator:
@BenTen The histogram is small (low) on certain ticker. Not visible even after zoom in. It has a fixed scale. When I'm home today will show you the chart what I was talking about.
Btw, is there a chance for you to show the original version?
First post in these forums but have been visiting for some time now... Hoping to contribute when I can...

This issue is caused by the deadzone setting being set too high due to trade instrument pricing differences... When I use this script for day trading options I set the value to 0.2 instead of the default setting of 20... The only other changes I have made to the script posted above, so far, are the ex and xLine colors... Hope this helps someone...

I use a laundry list of indicators to validate or invalidate potential trades... Realistically, I could suffice with Renko Bars, RSI superimposed over the Renko Bars, Trend Reversal Indicator with Signals, and Waddah Attar Explosion...
 
@rad14733 Welcome to our community :)

Thank you for letting me know about that. No wonder why the default setting doesn't work very well.
 
@rad14733 Doesn't setting the deadzone to 0.2 basically make the blue line ineffective?
Not at all, apmerf, but a good question... The blue deadZone line should be below the ExplosionLine, most of the time... However, if the ExplosinLine falls below the deadZone line that would invalidate a potential trade signal... For example, if a green bar were to cross above the ExplosinLine while the ExplosinLine is below the deadZone line the trade signal would be invalid due to market weakness... The trick is to determine what the deadZone line value needs to be in relation to the instrument being monitored and traded... For stock options in the ~$2.00 range that setting is around 0.2... I haven't tested to see what the value needs to be for higher priced instruments, but I'm assuming that it would be ~10% of the instruments trade range... I'll do some testing and report back with my findings... The previous solution of simply turning off the deadZone line would definitely be ineffective...
 
@rad14733 Thanks for the insight. Are you actually watching a chart for the option itself and then using this indicator? I've been playing around with it for stocks, but using 10% seems to have wildly different results.
 
Yes, I watch the actual option and use this indicator, as well as others, to determine entry and exit... I usually monitor 8 options and their underlying stocks throughout every trading session... Between trades I review the option chains to make sure I don't need to adjust strike prices, based on underlying stock movement... After hours I review the days activity and determine whether any indicator tweaks are required... Then, before the trading session starts, I do another quick review to see if premarket trading indicates any need for strike price adjustments...
 
@rad14733 Is it possible to code the deadzone to automatically adjust based on the options range? maybe with ATR? I am trying to get this to work for scalping TSLA options. I have no coding experience so I will need a dumbed down response.
 
@rad14733 I'd never even heard of this indicator, I was just bored last night so I looked at that code haha Any decent results with it and on what time frames does it tend to do best?
 
I'd never even heard of this indicator, I was just bored last night so I looked at that code haha Any decent results with it and on what time frames does it tend to do best?
I've been using WAE for quite some time... I had made some changes when I added it to my Renko Bar Based Trading System for Thinkorswim but have since reverted back to the original configuration because my modified version only performed well for long trades and call options and just wasn't effective for short trades and put options...

I mainly use short timeframes because I primarily do scalping and day trades but I'm sure it would work well for most timeframes...
 

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

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
326 Online
Create Post

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