Wicks & Tails Price Action Indicator For ThinkOrSwim

sonnyjitsu

New member
discussion began:
https://usethinkscript.com/threads/help-with-price-action-indicator.12348/#post-106258

Here is the final script after doing a little more work...

Ruby:
# This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
# sonnyjitsu

input largeSpread = 0.60;
input irregularBody = 0.10;

input volumeMA = 12;
def lowerTail;
def upperTail;

if close > open {
    upperTail = (high - close);
    lowerTail = (open - low);
} else {
    upperTail = (high - open);
    lowerTail = (close - low);
}

def candleBody = AbsValue(close - open);
def thePlot = close;

def goodVolume = volume >= ExpAverage(volume, volumeMA);

def cond2 = ((lowerTail > upperTail) and goodVolume and lowerTail > candleBody / 2);
def cond3 = ((upperTail > lowerTail) and goodVolume and upperTail > candleBody / 2);
def largeBodyGoodVolumeUp = close > open and candleBody > largeSpread and goodVolume;
def largeBodyGoodVolumeDown = close < open and candleBody > largeSpread and goodVolume;

plot priceActionIrregularUp = if candleBody < irregularBody and goodVolume and lowerTail > upperTail and lowerTail > candleBody / 2 then close else Double.NaN;
priceActionIrregularUp.SetDefaultColor(Color.MAGENTA);
priceActionIrregularUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

plot priceActionIrregularDown = if candleBody < irregularBody and goodVolume and upperTail > lowerTail and upperTail > candleBody / 2 then close else Double.NaN;
priceActionIrregularDown.SetDefaultColor(Color.MAGENTA);
priceActionIrregularDown.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

plot priceActionArrowUp = if largeBodyGoodVolumeUp or cond2 and !largeBodyGoodVolumeDown then close else Double.NaN;
priceActionArrowUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
priceActionArrowUp.SetDefaultColor(Color.GREEN);

plot priceActionArrowDown = if largeBodyGoodVolumeDown or cond3 and !largeBodyGoodVolumeUp then close else Double.NaN;
priceActionArrowDown.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
priceActionArrowDown.SetDefaultColor(Color.RED);

plot IrregularUp = if !goodVolume and lowerTail > upperTail and lowerTail > (candleBody / 2) and close > open then close else Double.NaN;
IrregularUp.SetDefaultColor(Color.MAGENTA);
IrregularUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

plot IrregularDown = if !goodVolume and upperTail > lowerTail and upperTail > (candleBody / 2) and open > close then close else Double.NaN;
IrregularDown.SetDefaultColor(Color.MAGENTA);
IrregularDown.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
 
Last edited by a moderator:
Could you tell me what the indicator is looking at for its decisions. I think I have a general idea looking at the code. I'm seeing if I can utilize part of it with another indicator I have.
 

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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