Indicator that Ignores the Wicks.

BrokeTeacher

New member
Good afternoon. I am trying to find a custom indicator/study for ToS that only tracks a stock's main body, top or bottom, ignoring the wicks. The scenario I am trying to avoid: I custom short a stock that buys when the close crosses above the high of the previous bar. The main body of the current bar stays below the high of the previous bar, but a wicks pops up and causes the buy to occur. Here is an illustration from today's trade (www.screencast.com/t/3khvLCX7h1)... lost out on a big drop due to that wick. I would greatly appreciate help finding a solution. Thank you for reading!
 
Solution
Good afternoon. I am trying to find a custom indicator/study for ToS that only tracks a stock's main body, top or bottom, ignoring the wicks. The scenario I am trying to avoid: I custom short a stock that buys when the close crosses above the high of the previous bar. The main body of the current bar stays below the high of the previous bar, but a wicks pops up and causes the buy to occur. Here is an illustration from today's trade (www.screencast.com/t/3khvLCX7h1)... lost out on a big drop due to that wick. I would greatly appreciate help finding a solution. Thank you for reading!

something like this ?
it compares the body top to previous body top. ( and bottoms)

Code:
# prev_body_hi_0

#...
Good afternoon. I am trying to find a custom indicator/study for ToS that only tracks a stock's main body, top or bottom, ignoring the wicks. The scenario I am trying to avoid: I custom short a stock that buys when the close crosses above the high of the previous bar. The main body of the current bar stays below the high of the previous bar, but a wicks pops up and causes the buy to occur. Here is an illustration from today's trade (www.screencast.com/t/3khvLCX7h1)... lost out on a big drop due to that wick. I would greatly appreciate help finding a solution. Thank you for reading!

something like this ?
it compares the body top to previous body top. ( and bottoms)

Code:
# prev_body_hi_0

# https://usethinkscript.com/threads/indicator-that-ignores-the-wicks.12754/
input candle_levels = { "wick" , default "body" };
def highx;
def lowx;
switch (candle_levels) {
case "wick":
    highx = high;
    lowx = low;
case "body":
    highx = Max( open, close);
    lowx = Min( open, close);
}


def hihi = (close crosses above highx[1]);
def lolo = (close crosses below lowx[1]);

plot u = hihi;
u.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
u.SetDefaultColor(Color.green);

plot d = lolo;
d.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
d.SetDefaultColor(Color.red);
#
 
Solution

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

Thank you for the quick response, Halcyonguy! This looks cool on the ToS main chart, but when I try to make it a study I can use for custom buying/selling, within the Thinkscript Editor, it is rejected. Should I be only copying a section of it (I have tried some variations)? Thank you for your time & assistance.
 
Thank you for the quick response, Halcyonguy! This looks cool on the ToS main chart, but when I try to make it a study I can use for custom buying/selling, within the Thinkscript Editor, it is rejected. Should I be only copying a section of it (I have tried some variations)? Thank you for your time & assistance.

i'm not sure what section of TOS you are trying to apply a study...
are you trying to apply a study as a rule in an order?

i'll make some guesses, but will request someone else answer this.

i'm guessing it needs to be changed so that the plot formula is true or false?
Code:
plot hihi = (close crosses above Max( open[1], close[1] );

or maybe plot isn't needed?
Code:
 (close crosses above Max( open[1], close[1] );
 
Thank you again, halcyonguy! I apologize if I was not clear. I want to use this indicator for two purposes:

1) When I create an order, I want to make this one of the Conditions (clicking on the gear icon to the right of the order, then choosing "Condition"), specifically a study I can insert as a condition that must be met to buy or sell.

2) A scan indicator I can use, so I am alerted when the body of a bar, not a wick, has moved in a certain direction.

Thank you again for your time and assistance.
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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