Pop out the scan bearish side


Category:
0
0

Hi Pete,

I have a scan in TC2000 which basically identifies consolidation of 4 bars ( usually less than 1 %).

Its consolidates in a box and as soon as the current candle breaks above the previous 4 candles we can enter a long trade.

Can you please help me convert tc2000 scan to thinkscript?

MAXC4.1 / MINC4.1 < 1.01 and C > MAXH4.1 and H > L

this was your reply below and it works well

def highestClose = Highest(close[1], 4);
def lowestClose = Lowest(close[1], 4);
def highestHigh = Highest(high[1], 4);
plot scan = highestClose / lowestClose < 1.01 and close > highesthigh and high > low;”

can you please give me one on the bearish side for the below tc2000 scan

MINC4.1/ MAXC4.1 < 1.01 and C < MINC4.1 and L<H

Thanks,

Ravi

Marked as spam
Posted by (Questions: 1, Answers: 1)
Asked on December 17, 2021 7:32 pm
106 views
0
Private answer

When you reference a previous solution in your new post its very important to provide our viewers with a link to that resource. Otherwise they will be very frustrated at not being able to view the original post and get the full context of your request.

Here is a link to the previous post you referenced:

https://www.hahn-tech.com/ans/consolidation-and-pop-out-of-the-box-tc2000/

While working on the solution I noticed that your bearish formula is not the exact opposite of the bullish formula. In the bullish formula you have the following section:

C > MAXH4.1

In your bearish formula that same section has been changed to:

C < MINC4.1

The difference is very subtle, but the exact opposite of "C > MAXH4.1" is actually "C < MINL4.1". Not sure if that was intentionally done that way or if it was a typo on your part. So I am providing and exact translation of your bearish formula just as you have stated it.

Here is the solution that translates your TC2000 code into Thinkorswim:

def highestClose = Highest(close[1], 4);
def lowestClose = Lowest(close[1], 4);
plot scan = lowestClose / highestClose < 1.01 and close < lowestClose and low < high;

Marked as spam
Posted by (Questions: 37, Answers: 4084)
Answered on December 18, 2021 9:06 am