Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Double tops and bottoms Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
truetrend
Posted : Monday, October 24, 2016 12:25:59 PM
Registered User
Joined: 6/16/2005
Posts: 131

So I am only using the 1st formula.  But I cannot get it working the way you explain.  

I click New-Indicator(PCF) Formula - paste the 1st formula and Save it and add it to the chart and watchlist (of every US Stock, which I further sorted to onbly show stocks > $5).  Instead of a single green line, I get a new pane on the chart with a single line titled "Formula(ABS..)"  In the watchlist column, I have 2218 stocks with a check mark (of the 4942 possibles), but no green lines on the chart.  Please help.  I am sure I am just missing something simple.  Thank you.

Bruce_L
Posted : Monday, October 24, 2016 12:50:43 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

I didn't really explain. I said to add a Custom PCF Indicator to the chart and then provided some links with illustrated step-by-step instructions on how to add and edit indicators.

QUOTE (Bruce_L)
You could use something like the following as the Formula in a Custom PCF Indicator to plot the green line. Note that the value will drop to zero if the requirements have not been met in the last 50 bars, so you might want to set the price scale to only use price.

How to add an indicator to a chart template
How to edit an Indicator

Then I provided the formula and some additional commentary.

QUOTE (Bruce_L)
It won't actually start plotting the line until 3 bars after the low. You could add a 1 period moving average to the Custom PCF Indicator with the Offset set to -3 in order to correct this. You may want to actually plot both so the line keeps going for a bit, but you could also set the Opacity setting of the original Custom PCF Indicator all the way to the left to make it not visible.

In any case, you don't select New - Indicator (PCF) Formula, you click on Add Plot to Chart (the green + in the upper left corner of the chart) and choose Custom PCF Indicator from the list.

Then you click on the Custom PCF Indicator on the chart and select Edit to enter the formula. You may also want to change the color here to green if you aren't going to add an offset moving average to it for the plot.

Then overlay the indicator into the same pane and scale as price.

How to Overlay an Indicator



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
truetrend
Posted : Monday, October 24, 2016 4:06:44 PM
Registered User
Joined: 6/16/2005
Posts: 131

I followed your instructions.  The indicator is now overlay-ed on the price section of the chart, but this is not at all what I was looking for. You created a 1 line indicator.  It doesn't seem to mark old lows nor does it mark multiple lows.  

If you see the chart I posted on Wednesday, September 28, 2016 8:53:48 PM, there are multiple, independent green lines marking each low.  I

included another example below, showing exactly what I need.  This way the indicator will see as many lows with the 10% decline and the green linedrawn at the lowest point.  Any time today's price hits any of those lows (noted by an independent green line), and there was a 5% bounce after the start of the green line, it would show as true in a scan run.  

In the example below there are 4 independent green lines which have nothing to do with each other.

Bruce_L
Posted : Monday, October 24, 2016 4:13:26 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

I can't make it mark old lows like that. That is not happening.

The indicator can look back 50 bars. The indicator can plot the most recent low that meets the requirement that happened during those 50 bars. That is it. That is all it can do.

If the low was more than 50 bars prior to the point being plotted, it will drop to a value of zero because it can't look back far enough to plot that low.

If there is a more recent low which meets the requirements, it will replace the previous low. It won't keep plotting the previous low.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
truetrend
Posted : Monday, October 24, 2016 4:18:04 PM
Registered User
Joined: 6/16/2005
Posts: 131

Here is what I see when I use your code.  The green line is 1 continious green line.  Not only doesnt draw multiple horizontal green lines at the lows, it doesn't hit any low dead on.  It should mark them where I drew the red circles (although all but the last 4 red circles would have been traded at so the green line would have either been stopped or disappeared depending on how you coded it).  Please advise.

truetrend
Posted : Monday, October 24, 2016 4:21:22 PM
Registered User
Joined: 6/16/2005
Posts: 131

I just saw your response.  Is that a limitation in TC2000 or in the cide you wrote?  Can what I want to have done be completed using TC2000 or is it totally impossible using this software?  Thx.

Bruce_L
Posted : Monday, October 24, 2016 4:22:31 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

The Custom PCF Indicator in the image you just posted isn't plotted in the same scale as price. That option would have been offered when overlaying it into the price pane, but you can still do it now.

Click on the indicator and select Scaling. Then choose to scale it with Price (this will probably be listed as the symbol and company name instead of saying Price or Price History).

Price Scaling (5:46)
Indicator Scaling (2:38)

In some sense the limitation is in the Personal Criteria Formula I wrote. That said there isn't going to plot exactly what you want in TC2000 at all. There is no better way to do it.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
truetrend
Posted : Monday, October 24, 2016 4:46:13 PM
Registered User
Joined: 6/16/2005
Posts: 131

Ok I rescaled it but I have 2 questions.

1 - On a watchlist of 4942, I have 3130 stocks witha  check, showing positive for the indicator.  That obviously isnt narrowing down teh pool enough to those hitting the last low today.  Is there someing I am doing wrong or something that can be tweaked?

2 - What I origonally wanted, a series of independent horizontal lines marking every low with a 10% drop into the low, that have not been traded at yet, possible to creat using TC2000?  I am not sure if its the software or your limited tome to create the code that was the reason it could not be done.  Please advise and thanks for the help.

Bruce_L
Posted : Monday, October 24, 2016 5:05:54 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

A Condition Formula for the bar where the low is identified is fairly short. Note that the low is identified 3 bars after the low itself because it needs to have three lows higher than the low in order for the requirements to be met.

MINL3 > L3 AND L3 = MINL20.3 AND L3 <= .9 * MAXH36.12

If you want to check for the retest, then the Condition Formulas are going to be longer. Two possible versions were provided in my Friday, September 30, 2016 1:46:34 PM ET post.

I can't say for sure that the limitation is not just my programming ability. That said, I am actually fairly confident nobody else would be able to use a Custom PCF Indicator to do what you want within TC2000 either. I am also fairly confident there isn't a currently available alternative within TC2000 to do what you want.

The Personal Criteria Formula Language is just that, it is a formula language. It is not a programming language and it doesn't have things like user assigned variables or looping structures. The only "if...then...else" functionality is provided by the fact that Booleans (true or false formula bits) return -1 when true and 0 when false when put in parentheses or 1 when true and 0 when false when put in an ABS() function. You pretty much need to express everything in a single logical line of code.

While it would be theoretically possible to check for something besides the most recent instance of MINL3 > L3 AND L3 = MINL20.3 AND L3 <= .9 * MAXH36.12 being true, it would be far more complicated than the already long and slow formula I wrote to plot the most recent value at which the condition was true. And that was limited to checking back 50 bars.

Without some sort of innovative mathematical algorithm which can be expressed using the syntax built into the PCF algorithm, anything trying to plot more than the most recent instance would be way too long and slow to be practical or post in the forums.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
truetrend
Posted : Monday, October 24, 2016 8:44:28 PM
Registered User
Joined: 6/16/2005
Posts: 131

The formula posted on Friday, September 30, 2016 12:46:52 PM works but generates thousands of results.  When I replace it with either of the formulas you posted on Friday, September 30, 2016 1:46:34 PM generates the message "ERROR: Must not be a Boolean formula" 

All I did was paste the formula in after hitting edit, as you advised above.  Please check this out.  Thanks.

diceman
Posted : Tuesday, October 25, 2016 8:54:08 AM
Registered User
Joined: 1/28/2005
Posts: 6,049

QUOTE (Bruce_L)

You could use something like the following as the Formula in a Custom PCF Indicator to plot the green line. Note that the value will drop to zero if the requirements have not been met in the last 50 bars, so you might want to set the price scale to only use price.

How to add an indicator to a chart template
How to edit an Indicator

ABS(MINL3 > L3 AND L3 = MINL20.3 AND L3 <= .9 * MAXH36.12) * L3 + ABS(MINL3 <= L3 OR L3 > MINL20.3 OR L3 > .9 * MAXH36.12) * (ABS(MINL3.1 > L4 AND L4 = MINL20.4 AND L4 <= .9 * MAXH36.13) * L4 + ABS(MINL3.1 <= L4 OR L4 > MINL20.4 OR L4 > .9 * MAXH36.13) * (ABS(MINL3.2 > L5 AND L5 = MINL20.5 AND L5 <= .9 * MAXH36.14) * L5 + ABS(MINL3.2 <= L5 OR L5 > MINL20.5 OR L5 > .9 * MAXH36.14) * (ABS(MINL3.3 > L6 AND L6 = MINL20.6 AND L6 <= .9 * MAXH36.15) * L6 + ABS(MINL3.3 <= L6 OR L6 > MINL20.6 OR L6 > .9 * MAXH36.15) * (ABS(MINL3.4 > L7 AND L7 = MINL20.7 AND L7 <= .9 * MAXH36.16) * L7 + ABS(MINL3.4 <= L7 OR L7 > MINL20.7 OR L7 > .9 * MAXH36.16) * (ABS(MINL3.5 > L8 AND L8 = MINL20.8 AND L8 <= .9 * MAXH36.17) * L8 + ABS(MINL3.5 <= L8 OR L8 > MINL20.8 OR L8 > .9 * MAXH36.17) * (ABS(MINL3.6 > L9 AND L9 = MINL20.9 AND L9 <= .9 * MAXH36.18) * L9 + ABS(MINL3.6 <= L9 OR L9 > MINL20.9 OR L9 > .9 * MAXH36.18) * (ABS(MINL3.7 > L10 AND L10 = MINL20.10 AND L10 <= .9 * MAXH36.19) * L10 + ABS(MINL3.7 <= L10 OR L10 > MINL20.10 OR L10 > .9 * MAXH36.19) * (ABS(MINL3.8 > L11 AND L11 = MINL20.11 AND L11 <= .9 * MAXH36.20) * L11 + ABS(MINL3.8 <= L11 OR L11 > MINL20.11 OR L11 > .9 * MAXH36.20) * (ABS(MINL3.9 > L12 AND L12 = MINL20.12 AND L12 <= .9 * MAXH36.21) * L12 + ABS(MINL3.9 <= L12 OR L12 > MINL20.12 OR L12 > .9 * MAXH36.21) * (ABS(MINL3.10 > L13 AND L13 = MINL20.13 AND L13 <= .9 * MAXH36.22) * L13 + ABS(MINL3.10 <= L13 OR L13 > MINL20.13 OR L13 > .9 * MAXH36.22) * (ABS(MINL3.11 > L14 AND L14 = MINL20.14 AND L14 <= .9 * MAXH36.23) * L14 + ABS(MINL3.11 <= L14 OR L14 > MINL20.14 OR L14 > .9 * MAXH36.23) * (ABS(MINL3.12 > L15 AND L15 = MINL20.15 AND L15 <= .9 * MAXH36.24) * L15 + ABS(MINL3.12 <= L15 OR L15 > MINL20.15 OR L15 > .9 * MAXH36.24) * (ABS(MINL3.13 > L16 AND L16 = MINL20.16 AND L16 <= .9 * MAXH36.25) * L16 + ABS(MINL3.13 <= L16 OR L16 > MINL20.16 OR L16 > .9 * MAXH36.25) * (ABS(MINL3.14 > L17 AND L17 = MINL20.17 AND L17 <= .9 * MAXH36.26) * L17 + ABS(MINL3.14 <= L17 OR L17 > MINL20.17 OR L17 > .9 * MAXH36.26) * (ABS(MINL3.15 > L18 AND L18 = MINL20.18 AND L18 <= .9 * MAXH36.27) * L18 + ABS(MINL3.15 <= L18 OR L18 > MINL20.18 OR L18 > .9 * MAXH36.27) * (ABS(MINL3.16 > L19 AND L19 = MINL20.19 AND L19 <= .9 * MAXH36.28) * L19 + ABS(MINL3.16 <= L19 OR L19 > MINL20.19 OR L19 > .9 * MAXH36.28) * (ABS(MINL3.17 > L20 AND L20 = MINL20.20 AND L20 <= .9 * MAXH36.29) * L20 + ABS(MINL3.17 <= L20 OR L20 > MINL20.20 OR L20 > .9 * MAXH36.29) * (ABS(MINL3.18 > L21 AND L21 = MINL20.21 AND L21 <= .9 * MAXH36.30) * L21 + ABS(MINL3.18 <= L21 OR L21 > MINL20.21 OR L21 > .9 * MAXH36.30) * (ABS(MINL3.19 > L22 AND L22 = MINL20.22 AND L22 <= .9 * MAXH36.31) * L22 + ABS(MINL3.19 <= L22 OR L22 > MINL20.22 OR L22 > .9 * MAXH36.31) * (ABS(MINL3.20 > L23 AND L23 = MINL20.23 AND L23 <= .9 * MAXH36.32) * L23 + ABS(MINL3.20 <= L23 OR L23 > MINL20.23 OR L23 > .9 * MAXH36.32) * (ABS(MINL3.21 > L24 AND L24 = MINL20.24 AND L24 <= .9 * MAXH36.33) * L24 + ABS(MINL3.21 <= L24 OR L24 > MINL20.24 OR L24 > .9 * MAXH36.33) * (ABS(MINL3.22 > L25 AND L25 = MINL20.25 AND L25 <= .9 * MAXH36.34) * L25 + ABS(MINL3.22 <= L25 OR L25 > MINL20.25 OR L25 > .9 * MAXH36.34) * (ABS(MINL3.23 > L26 AND L26 = MINL20.26 AND L26 <= .9 * MAXH36.35) * L26 + ABS(MINL3.23 <= L26 OR L26 > MINL20.26 OR L26 > .9 * MAXH36.35) * (ABS(MINL3.24 > L27 AND L27 = MINL20.27 AND L27 <= .9 * MAXH36.36) * L27 + ABS(MINL3.24 <= L27 OR L27 > MINL20.27 OR L27 > .9 * MAXH36.36) * (ABS(MINL3.25 > L28 AND L28 = MINL20.28 AND L28 <= .9 * MAXH36.37) * L28 + ABS(MINL3.25 <= L28 OR L28 > MINL20.28 OR L28 > .9 * MAXH36.37) * (ABS(MINL3.26 > L29 AND L29 = MINL20.29 AND L29 <= .9 * MAXH36.38) * L29 + ABS(MINL3.26 <= L29 OR L29 > MINL20.29 OR L29 > .9 * MAXH36.38) * (ABS(MINL3.27 > L30 AND L30 = MINL20.30 AND L30 <= .9 * MAXH36.39) * L30 + ABS(MINL3.27 <= L30 OR L30 > MINL20.30 OR L30 > .9 * MAXH36.39) * (ABS(MINL3.28 > L31 AND L31 = MINL20.31 AND L31 <= .9 * MAXH36.40) * L31 + ABS(MINL3.28 <= L31 OR L31 > MINL20.31 OR L31 > .9 * MAXH36.40) * (ABS(MINL3.29 > L32 AND L32 = MINL20.32 AND L32 <= .9 * MAXH36.41) * L32 + ABS(MINL3.29 <= L32 OR L32 > MINL20.32 OR L32 > .9 * MAXH36.41) * (ABS(MINL3.30 > L33 AND L33 = MINL20.33 AND L33 <= .9 * MAXH36.42) * L33 + ABS(MINL3.30 <= L33 OR L33 > MINL20.33 OR L33 > .9 * MAXH36.42) * (ABS(MINL3.31 > L34 AND L34 = MINL20.34 AND L34 <= .9 * MAXH36.43) * L34 + ABS(MINL3.31 <= L34 OR L34 > MINL20.34 OR L34 > .9 * MAXH36.43) * (ABS(MINL3.32 > L35 AND L35 = MINL20.35 AND L35 <= .9 * MAXH36.44) * L35 + ABS(MINL3.32 <= L35 OR L35 > MINL20.35 OR L35 > .9 * MAXH36.44) * (ABS(MINL3.33 > L36 AND L36 = MINL20.36 AND L36 <= .9 * MAXH36.45) * L36 + ABS(MINL3.33 <= L36 OR L36 > MINL20.36 OR L36 > .9 * MAXH36.45) * (ABS(MINL3.34 > L37 AND L37 = MINL20.37 AND L37 <= .9 * MAXH36.46) * L37 + ABS(MINL3.34 <= L37 OR L37 > MINL20.37 OR L37 > .9 * MAXH36.46) * (ABS(MINL3.35 > L38 AND L38 = MINL20.38 AND L38 <= .9 * MAXH36.47) * L38 + ABS(MINL3.35 <= L38 OR L38 > MINL20.38 OR L38 > .9 * MAXH36.47) * (ABS(MINL3.36 > L39 AND L39 = MINL20.39 AND L39 <= .9 * MAXH36.48) * L39 + ABS(MINL3.36 <= L39 OR L39 > MINL20.39 OR L39 > .9 * MAXH36.48) * (ABS(MINL3.37 > L40 AND L40 = MINL20.40 AND L40 <= .9 * MAXH36.49) * L40 + ABS(MINL3.37 <= L40 OR L40 > MINL20.40 OR L40 > .9 * MAXH36.49) * (ABS(MINL3.38 > L41 AND L41 = MINL20.41 AND L41 <= .9 * MAXH36.50) * L41 + ABS(MINL3.38 <= L41 OR L41 > MINL20.41 OR L41 > .9 * MAXH36.50) * (ABS(MINL3.39 > L42 AND L42 = MINL20.42 AND L42 <= .9 * MAXH36.51) * L42 + ABS(MINL3.39 <= L42 OR L42 > MINL20.42 OR L42 > .9 * MAXH36.51) * (ABS(MINL3.40 > L43 AND L43 = MINL20.43 AND L43 <= .9 * MAXH36.52) * L43 + ABS(MINL3.40 <= L43 OR L43 > MINL20.43 OR L43 > .9 * MAXH36.52) * (ABS(MINL3.41 > L44 AND L44 = MINL20.44 AND L44 <= .9 * MAXH36.53) * L44 + ABS(MINL3.41 <= L44 OR L44 > MINL20.44 OR L44 > .9 * MAXH36.53) * (ABS(MINL3.42 > L45 AND L45 = MINL20.45 AND L45 <= .9 * MAXH36.54) * L45 + ABS(MINL3.42 <= L45 OR L45 > MINL20.45 OR L45 > .9 * MAXH36.54) * (ABS(MINL3.43 > L46 AND L46 = MINL20.46 AND L46 <= .9 * MAXH36.55) * L46 + ABS(MINL3.43 <= L46 OR L46 > MINL20.46 OR L46 > .9 * MAXH36.55) * (ABS(MINL3.44 > L47 AND L47 = MINL20.47 AND L47 <= .9 * MAXH36.56) * L47 + ABS(MINL3.44 <= L47 OR L47 > MINL20.47 OR L47 > .9 * MAXH36.56) * (ABS(MINL3.45 > L48 AND L48 = MINL20.48 AND L48 <= .9 * MAXH36.57) * L48 + ABS(MINL3.45 <= L48 OR L48 > MINL20.48 OR L48 > .9 * MAXH36.57) * (ABS(MINL3.46 > L49 AND L49 = MINL20.49 AND L49 <= .9 * MAXH36.58) * L49 + ABS(MINL3.46 <= L49 OR L49 > MINL20.49 OR L49 > .9 * MAXH36.58) * (ABS(MINL3.47 > L50 AND L50 = MINL20.50 AND L50 <= .9 * MAXH36.59) * L50)))))))))))))))))))))))))))))))))))))))))))))))

It won't actually start plotting the line until 3 bars after the low. You could add a 1 period moving average to the Custom PCF Indicator with the Offset set to -3 in order to correct this. You may want to actually plot both so the line keeps going for a bit, but you could also set the Opacity setting of the original Custom PCF Indicator all the way to the left to make it not visible.

For X, are you only going to want to check against the most recent value of the green line or against previous values as well?

 

Bruce

Can you invert the logic and have it draw lines at highs?

 

 

Thanks

 

Bruce_L
Posted : Tuesday, October 25, 2016 9:43:43 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

truetrend,

The Indicator Formula in my Friday, September 30, 2016 12:46:52 PM ET post returns numeric values and is designed specifically to plot the line on the chart. It is not designed to be used as a Condition Fomula. Please don't do so.

If you are trying to figure out if something is true or not, please use one of the Condition Formulas in my Monday, October 24, 2016 5:05:54 PM ET or Friday, September 30, 2016 1:46:34 PM ET posts.

diceman,

Please try the following.

ABS(MAXH3 < H3 AND H3 = MAXH20.3 AND H3 >= 1.1 * MINL36.12) * H3 + ABS(MAXH3 >= H3 OR H3 < MAXH20.3 OR H3 < 1.1 * MINL36.12) * (ABS(MAXH3.1 < H4 AND H4 = MAXH20.4 AND H4 >= 1.1 * MINL36.13) * H4 + ABS(MAXH3.1 >= H4 OR H4 < MAXH20.4 OR H4 < 1.1 * MINL36.13) * (ABS(MAXH3.2 < H5 AND H5 = MAXH20.5 AND H5 >= 1.1 * MINL36.14) * H5 + ABS(MAXH3.2 >= H5 OR H5 < MAXH20.5 OR H5 < 1.1 * MINL36.14) * (ABS(MAXH3.3 < H6 AND H6 = MAXH20.6 AND H6 >= 1.1 * MINL36.15) * H6 + ABS(MAXH3.3 >= H6 OR H6 < MAXH20.6 OR H6 < 1.1 * MINL36.15) * (ABS(MAXH3.4 < H7 AND H7 = MAXH20.7 AND H7 >= 1.1 * MINL36.16) * H7 + ABS(MAXH3.4 >= H7 OR H7 < MAXH20.7 OR H7 < 1.1 * MINL36.16) * (ABS(MAXH3.5 < H8 AND H8 = MAXH20.8 AND H8 >= 1.1 * MINL36.17) * H8 + ABS(MAXH3.5 >= H8 OR H8 < MAXH20.8 OR H8 < 1.1 * MINL36.17) * (ABS(MAXH3.6 < H9 AND H9 = MAXH20.9 AND H9 >= 1.1 * MINL36.18) * H9 + ABS(MAXH3.6 >= H9 OR H9 < MAXH20.9 OR H9 < 1.1 * MINL36.18) * (ABS(MAXH3.7 < H10 AND H10 = MAXH20.10 AND H10 >= 1.1 * MINL36.19) * H10 + ABS(MAXH3.7 >= H10 OR H10 < MAXH20.10 OR H10 < 1.1 * MINL36.19) * (ABS(MAXH3.8 < H11 AND H11 = MAXH20.11 AND H11 >= 1.1 * MINL36.20) * H11 + ABS(MAXH3.8 >= H11 OR H11 < MAXH20.11 OR H11 < 1.1 * MINL36.20) * (ABS(MAXH3.9 < H12 AND H12 = MAXH20.12 AND H12 >= 1.1 * MINL36.21) * H12 + ABS(MAXH3.9 >= H12 OR H12 < MAXH20.12 OR H12 < 1.1 * MINL36.21) * (ABS(MAXH3.10 < H13 AND H13 = MAXH20.13 AND H13 >= 1.1 * MINL36.22) * H13 + ABS(MAXH3.10 >= H13 OR H13 < MAXH20.13 OR H13 < 1.1 * MINL36.22) * (ABS(MAXH3.11 < H14 AND H14 = MAXH20.14 AND H14 >= 1.1 * MINL36.23) * H14 + ABS(MAXH3.11 >= H14 OR H14 < MAXH20.14 OR H14 < 1.1 * MINL36.23) * (ABS(MAXH3.12 < H15 AND H15 = MAXH20.15 AND H15 >= 1.1 * MINL36.24) * H15 + ABS(MAXH3.12 >= H15 OR H15 < MAXH20.15 OR H15 < 1.1 * MINL36.24) * (ABS(MAXH3.13 < H16 AND H16 = MAXH20.16 AND H16 >= 1.1 * MINL36.25) * H16 + ABS(MAXH3.13 >= H16 OR H16 < MAXH20.16 OR H16 < 1.1 * MINL36.25) * (ABS(MAXH3.14 < H17 AND H17 = MAXH20.17 AND H17 >= 1.1 * MINL36.26) * H17 + ABS(MAXH3.14 >= H17 OR H17 < MAXH20.17 OR H17 < 1.1 * MINL36.26) * (ABS(MAXH3.15 < H18 AND H18 = MAXH20.18 AND H18 >= 1.1 * MINL36.27) * H18 + ABS(MAXH3.15 >= H18 OR H18 < MAXH20.18 OR H18 < 1.1 * MINL36.27) * (ABS(MAXH3.16 < H19 AND H19 = MAXH20.19 AND H19 >= 1.1 * MINL36.28) * H19 + ABS(MAXH3.16 >= H19 OR H19 < MAXH20.19 OR H19 < 1.1 * MINL36.28) * (ABS(MAXH3.17 < H20 AND H20 = MAXH20.20 AND H20 >= 1.1 * MINL36.29) * H20 + ABS(MAXH3.17 >= H20 OR H20 < MAXH20.20 OR H20 < 1.1 * MINL36.29) * (ABS(MAXH3.18 < H21 AND H21 = MAXH20.21 AND H21 >= 1.1 * MINL36.30) * H21 + ABS(MAXH3.18 >= H21 OR H21 < MAXH20.21 OR H21 < 1.1 * MINL36.30) * (ABS(MAXH3.19 < H22 AND H22 = MAXH20.22 AND H22 >= 1.1 * MINL36.31) * H22 + ABS(MAXH3.19 >= H22 OR H22 < MAXH20.22 OR H22 < 1.1 * MINL36.31) * (ABS(MAXH3.20 < H23 AND H23 = MAXH20.23 AND H23 >= 1.1 * MINL36.32) * H23 + ABS(MAXH3.20 >= H23 OR H23 < MAXH20.23 OR H23 < 1.1 * MINL36.32) * (ABS(MAXH3.21 < H24 AND H24 = MAXH20.24 AND H24 >= 1.1 * MINL36.33) * H24 + ABS(MAXH3.21 >= H24 OR H24 < MAXH20.24 OR H24 < 1.1 * MINL36.33) * (ABS(MAXH3.22 < H25 AND H25 = MAXH20.25 AND H25 >= 1.1 * MINL36.34) * H25 + ABS(MAXH3.22 >= H25 OR H25 < MAXH20.25 OR H25 < 1.1 * MINL36.34) * (ABS(MAXH3.23 < H26 AND H26 = MAXH20.26 AND H26 >= 1.1 * MINL36.35) * H26 + ABS(MAXH3.23 >= H26 OR H26 < MAXH20.26 OR H26 < 1.1 * MINL36.35) * (ABS(MAXH3.24 < H27 AND H27 = MAXH20.27 AND H27 >= 1.1 * MINL36.36) * H27 + ABS(MAXH3.24 >= H27 OR H27 < MAXH20.27 OR H27 < 1.1 * MINL36.36) * (ABS(MAXH3.25 < H28 AND H28 = MAXH20.28 AND H28 >= 1.1 * MINL36.37) * H28 + ABS(MAXH3.25 >= H28 OR H28 < MAXH20.28 OR H28 < 1.1 * MINL36.37) * (ABS(MAXH3.26 < H29 AND H29 = MAXH20.29 AND H29 >= 1.1 * MINL36.38) * H29 + ABS(MAXH3.26 >= H29 OR H29 < MAXH20.29 OR H29 < 1.1 * MINL36.38) * (ABS(MAXH3.27 < H30 AND H30 = MAXH20.30 AND H30 >= 1.1 * MINL36.39) * H30 + ABS(MAXH3.27 >= H30 OR H30 < MAXH20.30 OR H30 < 1.1 * MINL36.39) * (ABS(MAXH3.28 < H31 AND H31 = MAXH20.31 AND H31 >= 1.1 * MINL36.40) * H31 + ABS(MAXH3.28 >= H31 OR H31 < MAXH20.31 OR H31 < 1.1 * MINL36.40) * (ABS(MAXH3.29 < H32 AND H32 = MAXH20.32 AND H32 >= 1.1 * MINL36.41) * H32 + ABS(MAXH3.29 >= H32 OR H32 < MAXH20.32 OR H32 < 1.1 * MINL36.41) * (ABS(MAXH3.30 < H33 AND H33 = MAXH20.33 AND H33 >= 1.1 * MINL36.42) * H33 + ABS(MAXH3.30 >= H33 OR H33 < MAXH20.33 OR H33 < 1.1 * MINL36.42) * (ABS(MAXH3.31 < H34 AND H34 = MAXH20.34 AND H34 >= 1.1 * MINL36.43) * H34 + ABS(MAXH3.31 >= H34 OR H34 < MAXH20.34 OR H34 < 1.1 * MINL36.43) * (ABS(MAXH3.32 < H35 AND H35 = MAXH20.35 AND H35 >= 1.1 * MINL36.44) * H35 + ABS(MAXH3.32 >= H35 OR H35 < MAXH20.35 OR H35 < 1.1 * MINL36.44) * (ABS(MAXH3.33 < H36 AND H36 = MAXH20.36 AND H36 >= 1.1 * MINL36.45) * H36 + ABS(MAXH3.33 >= H36 OR H36 < MAXH20.36 OR H36 < 1.1 * MINL36.45) * (ABS(MAXH3.34 < H37 AND H37 = MAXH20.37 AND H37 >= 1.1 * MINL36.46) * H37 + ABS(MAXH3.34 >= H37 OR H37 < MAXH20.37 OR H37 < 1.1 * MINL36.46) * (ABS(MAXH3.35 < H38 AND H38 = MAXH20.38 AND H38 >= 1.1 * MINL36.47) * H38 + ABS(MAXH3.35 >= H38 OR H38 < MAXH20.38 OR H38 < 1.1 * MINL36.47) * (ABS(MAXH3.36 < H39 AND H39 = MAXH20.39 AND H39 >= 1.1 * MINL36.48) * H39 + ABS(MAXH3.36 >= H39 OR H39 < MAXH20.39 OR H39 < 1.1 * MINL36.48) * (ABS(MAXH3.37 < H40 AND H40 = MAXH20.40 AND H40 >= 1.1 * MINL36.49) * H40 + ABS(MAXH3.37 >= H40 OR H40 < MAXH20.40 OR H40 < 1.1 * MINL36.49) * (ABS(MAXH3.38 < H41 AND H41 = MAXH20.41 AND H41 >= 1.1 * MINL36.50) * H41 + ABS(MAXH3.38 >= H41 OR H41 < MAXH20.41 OR H41 < 1.1 * MINL36.50) * (ABS(MAXH3.39 < H42 AND H42 = MAXH20.42 AND H42 >= 1.1 * MINL36.51) * H42 + ABS(MAXH3.39 >= H42 OR H42 < MAXH20.42 OR H42 < 1.1 * MINL36.51) * (ABS(MAXH3.40 < H43 AND H43 = MAXH20.43 AND H43 >= 1.1 * MINL36.52) * H43 + ABS(MAXH3.40 >= H43 OR H43 < MAXH20.43 OR H43 < 1.1 * MINL36.52) * (ABS(MAXH3.41 < H44 AND H44 = MAXH20.44 AND H44 >= 1.1 * MINL36.53) * H44 + ABS(MAXH3.41 >= H44 OR H44 < MAXH20.44 OR H44 < 1.1 * MINL36.53) * (ABS(MAXH3.42 < H45 AND H45 = MAXH20.45 AND H45 >= 1.1 * MINL36.54) * H45 + ABS(MAXH3.42 >= H45 OR H45 < MAXH20.45 OR H45 < 1.1 * MINL36.54) * (ABS(MAXH3.43 < H46 AND H46 = MAXH20.46 AND H46 >= 1.1 * MINL36.55) * H46 + ABS(MAXH3.43 >= H46 OR H46 < MAXH20.46 OR H46 < 1.1 * MINL36.55) * (ABS(MAXH3.44 < H47 AND H47 = MAXH20.47 AND H47 >= 1.1 * MINL36.56) * H47 + ABS(MAXH3.44 >= H47 OR H47 < MAXH20.47 OR H47 < 1.1 * MINL36.56) * (ABS(MAXH3.45 < H48 AND H48 = MAXH20.48 AND H48 >= 1.1 * MINL36.57) * H48 + ABS(MAXH3.45 >= H48 OR H48 < MAXH20.48 OR H48 < 1.1 * MINL36.57) * (ABS(MAXH3.46 < H49 AND H49 = MAXH20.49 AND H49 >= 1.1 * MINL36.58) * H49 + ABS(MAXH3.46 >= H49 OR H49 < MAXH20.49 OR H49 < 1.1 * MINL36.58) * (ABS(MAXH3.47 < H50 AND H50 = MAXH20.50 AND H50 >= 1.1 * MINL36.59) * H50)))))))))))))))))))))))))))))))))))))))))))))))



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
truetrend
Posted : Tuesday, October 25, 2016 11:10:30 AM
Registered User
Joined: 6/16/2005
Posts: 131

If I want to have the line on the chart and and scan for true hits where the stocks trades at the lines price (the last low), I would need to use both the post from Condition Formulas in your Monday, October 24, 2016 5:05:54 PM ET or Friday, September 30, 2016 1:46:34 PM ET to scan a watch list to see if it is true

in addition to

the Indicator Formula in your Friday, September 30, 2016 12:46:52 PM ET post to plot the line on the chart.  Is that correct?

Bruce_L
Posted : Tuesday, October 25, 2016 11:26:37 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

You probably only need to use one of the Condition Formulas as each does something different.

The Condition Formula in my Monday, October 24, 2016 5:05:54 PM ET post returns true on the bar that the green line first starts plotting or changes values.

The first Condition Formula in my Friday, September 30, 2016 1:46:34 PM ET post returns true if the bar is intersected by the current green line or one of the previous green lines within the lookback period of the formula if there was a 5% rally in between. It however only returns true the first time that particular green line intersected a bar.

The second Condition Formula in my Friday, September 30, 2016 1:46:34 PM ET post also returns true if the bar is intersected by the current green line or one of the previous green lines within the lookback period of the formula if there was a 5% rally in between. It does not check to see if this is the first time that green line intersected a bar however.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
truetrend
Posted : Tuesday, October 25, 2016 12:01:41 PM
Registered User
Joined: 6/16/2005
Posts: 131

In your last post you said "The first Condition Formula in my Friday, September 30, 2016 1:46:34 PM ET post returns true if the bar is intersected by the current green line or one of the previous green lines within the lookback period of the formula if there was a 5% rally in between. It however only returns true the first time that particular green line intersected a bar."

I only run the scan once a day after the market has closed.  With that in mind, did you mean if the current green line will show true if I run a scan on a watchlist if TODAY'S BAR intersected the current green line?  That is the key.  I want to know if the days trading that just closed intersected the current green line (with the 5% rally happening in between).

Bruce_L
Posted : Tuesday, October 25, 2016 12:04:47 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

Yes, it would be today's bar on a daily chart.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
truetrend
Posted : Tuesday, October 25, 2016 5:37:51 PM
Registered User
Joined: 6/16/2005
Posts: 131

This is the one I am going to use - The first Condition Formula in my Friday, September 30, 2016 1:46:34 PM ET post returns true if the bar is intersected by the current green line or one of the previous green lines within the lookback period of the formula if there was a 5% rally in between. It however only returns true the first time that particular green line intersected a bar.

My question is how do I add it to a watchlist to scan by?  I get an error using the green X as you directed above.  Thanks.

truetrend
Posted : Tuesday, October 25, 2016 5:46:58 PM
Registered User
Joined: 6/16/2005
Posts: 131

Disregard the above.  I added to the watchlist and scanned getting 123 hits. 

I dont see a red x and there is no green line on the chart so I am sort of eye balling it.  How can I add
 the green line and still scan for true hits using your first Condition Formula in my Friday, September 30, 2016 1:46:34 PM ET post?

Bruce_L
Posted : Wednesday, October 26, 2016 12:29:10 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

The green line comes from using the formula from my Friday, September 30, 2016 12:46:52 PM ET post as the Formula in a Custom PCF Indicator plotted in the same pane and scale as price. I thought you already did this.

There isn't a way to add red Xs, but you could add red dots by adding a Custom PCF Indicator with the following settings to the same pane and scale as price.

- Plot Style: Dots
- Plot Color: Red
- Period: 1
- Average Type: Doesn't matter (because the Period is 1).
- Formula: L / ABS((MINL4.1 > L5 AND L5 = MINL20.5 AND L5 <= .9 * MAXH36.14 AND L <= L5 AND L5 <= H AND L5 * 1.05 <= MAXH4.1) OR (MINL5.1 > L6 AND L6 = MINL20.6 AND L6 <= .9 * MAXH36.15 AND L <= L6 AND L6 <= H AND L6 * 1.05 <= MAXH5.1) OR (MINL6.1 > L7 AND L7 = MINL20.7 AND L7 <= .9 * MAXH36.16 AND L <= L7 AND L7 <= H AND L7 * 1.05 <= MAXH6.1) OR (MINL7.1 > L8 AND L8 = MINL20.8 AND L8 <= .9 * MAXH36.17 AND L <= L8 AND L8 <= H AND L8 * 1.05 <= MAXH7.1) OR (MINL8.1 > L9 AND L9 = MINL20.9 AND L9 <= .9 * MAXH36.18 AND L <= L9 AND L9 <= H AND L9 * 1.05 <= MAXH8.1) OR (MINL9.1 > L10 AND L10 = MINL20.10 AND L10 <= .9 * MAXH36.19 AND L <= L10 AND L10 <= H AND L10 * 1.05 <= MAXH9.1) OR (MINL10.1 > L11 AND L11 = MINL20.11 AND L11 <= .9 * MAXH36.20 AND L <= L11 AND L11 <= H AND L11 * 1.05 <= MAXH10.1) OR (MINL11.1 > L12 AND L12 = MINL20.12 AND L12 <= .9 * MAXH36.21 AND L <= L12 AND L12 <= H AND L12 * 1.05 <= MAXH11.1) OR (MINL12.1 > L13 AND L13 = MINL20.13 AND L13 <= .9 * MAXH36.22 AND L <= L13 AND L13 <= H AND L13 * 1.05 <= MAXH12.1) OR (MINL13.1 > L14 AND L14 = MINL20.14 AND L14 <= .9 * MAXH36.23 AND L <= L14 AND L14 <= H AND L14 * 1.05 <= MAXH13.1) OR (MINL14.1 > L15 AND L15 = MINL20.15 AND L15 <= .9 * MAXH36.24 AND L <= L15 AND L15 <= H AND L15 * 1.05 <= MAXH14.1) OR (MINL15.1 > L16 AND L16 = MINL20.16 AND L16 <= .9 * MAXH36.25 AND L <= L16 AND L16 <= H AND L16 * 1.05 <= MAXH15.1) OR (MINL16.1 > L17 AND L17 = MINL20.17 AND L17 <= .9 * MAXH36.26 AND L <= L17 AND L17 <= H AND L17 * 1.05 <= MAXH16.1) OR (MINL17.1 > L18 AND L18 = MINL20.18 AND L18 <= .9 * MAXH36.27 AND L <= L18 AND L18 <= H AND L18 * 1.05 <= MAXH17.1) OR (MINL18.1 > L19 AND L19 = MINL20.19 AND L19 <= .9 * MAXH36.28 AND L <= L19 AND L19 <= H AND L19 * 1.05 <= MAXH18.1) OR (MINL19.1 > L20 AND L20 = MINL20.20 AND L20 <= .9 * MAXH36.29 AND L <= L20 AND L20 <= H AND L20 * 1.05 <= MAXH19.1) OR (MINL20.1 > L21 AND L21 = MINL20.21 AND L21 <= .9 * MAXH36.30 AND L <= L21 AND L21 <= H AND L21 * 1.05 <= MAXH20.1) OR (MINL21.1 > L22 AND L22 = MINL20.22 AND L22 <= .9 * MAXH36.31 AND L <= L22 AND L22 <= H AND L22 * 1.05 <= MAXH21.1) OR (MINL22.1 > L23 AND L23 = MINL20.23 AND L23 <= .9 * MAXH36.32 AND L <= L23 AND L23 <= H AND L23 * 1.05 <= MAXH22.1) OR (MINL23.1 > L24 AND L24 = MINL20.24 AND L24 <= .9 * MAXH36.33 AND L <= L24 AND L24 <= H AND L24 * 1.05 <= MAXH23.1) OR (MINL24.1 > L25 AND L25 = MINL20.25 AND L25 <= .9 * MAXH36.34 AND L <= L25 AND L25 <= H AND L25 * 1.05 <= MAXH24.1) OR (MINL25.1 > L26 AND L26 = MINL20.26 AND L26 <= .9 * MAXH36.35 AND L <= L26 AND L26 <= H AND L26 * 1.05 <= MAXH25.1) OR (MINL26.1 > L27 AND L27 = MINL20.27 AND L27 <= .9 * MAXH36.36 AND L <= L27 AND L27 <= H AND L27 * 1.05 <= MAXH26.1) OR (MINL27.1 > L28 AND L28 = MINL20.28 AND L28 <= .9 * MAXH36.37 AND L <= L28 AND L28 <= H AND L28 * 1.05 <= MAXH27.1) OR (MINL28.1 > L29 AND L29 = MINL20.29 AND L29 <= .9 * MAXH36.38 AND L <= L29 AND L29 <= H AND L29 * 1.05 <= MAXH28.1) OR (MINL29.1 > L30 AND L30 = MINL20.30 AND L30 <= .9 * MAXH36.39 AND L <= L30 AND L30 <= H AND L30 * 1.05 <= MAXH29.1) OR (MINL30.1 > L31 AND L31 = MINL20.31 AND L31 <= .9 * MAXH36.40 AND L <= L31 AND L31 <= H AND L31 * 1.05 <= MAXH30.1) OR (MINL31.1 > L32 AND L32 = MINL20.32 AND L32 <= .9 * MAXH36.41 AND L <= L32 AND L32 <= H AND L32 * 1.05 <= MAXH31.1) OR (MINL32.1 > L33 AND L33 = MINL20.33 AND L33 <= .9 * MAXH36.42 AND L <= L33 AND L33 <= H AND L33 * 1.05 <= MAXH32.1) OR (MINL33.1 > L34 AND L34 = MINL20.34 AND L34 <= .9 * MAXH36.43 AND L <= L34 AND L34 <= H AND L34 * 1.05 <= MAXH33.1) OR (MINL34.1 > L35 AND L35 = MINL20.35 AND L35 <= .9 * MAXH36.44 AND L <= L35 AND L35 <= H AND L35 * 1.05 <= MAXH34.1) OR (MINL35.1 > L36 AND L36 = MINL20.36 AND L36 <= .9 * MAXH36.45 AND L <= L36 AND L36 <= H AND L36 * 1.05 <= MAXH35.1) OR (MINL36.1 > L37 AND L37 = MINL20.37 AND L37 <= .9 * MAXH36.46 AND L <= L37 AND L37 <= H AND L37 * 1.05 <= MAXH36.1) OR (MINL37.1 > L38 AND L38 = MINL20.38 AND L38 <= .9 * MAXH36.47 AND L <= L38 AND L38 <= H AND L38 * 1.05 <= MAXH37.1) OR (MINL38.1 > L39 AND L39 = MINL20.39 AND L39 <= .9 * MAXH36.48 AND L <= L39 AND L39 <= H AND L39 * 1.05 <= MAXH38.1) OR (MINL39.1 > L40 AND L40 = MINL20.40 AND L40 <= .9 * MAXH36.49 AND L <= L40 AND L40 <= H AND L40 * 1.05 <= MAXH39.1) OR (MINL40.1 > L41 AND L41 = MINL20.41 AND L41 <= .9 * MAXH36.50 AND L <= L41 AND L41 <= H AND L41 * 1.05 <= MAXH40.1) OR (MINL41.1 > L42 AND L42 = MINL20.42 AND L42 <= .9 * MAXH36.51 AND L <= L42 AND L42 <= H AND L42 * 1.05 <= MAXH41.1))

Keep in mind that the green line has a longer lookback than this indicator. Also remember that only the most recent green line gets plotted even though the Condition Formula and this Custom PCF Indicator are checking against previous green lines during the lookback period as well. So the red dot might be associated with a green line that isn't actually being plotted anymore.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
truetrend
Posted : Thursday, October 27, 2016 12:22:41 AM
Registered User
Joined: 6/16/2005
Posts: 131

Bruce - Its working nicely.  Thanks.  I have 1 in the chart drawing the lines and 1 in an easyscan with some other code I added.

On  Tuesday, October 25, 2016 9:43:43 AM you wrote the code to draw the lines for a tops for Diceman.  Could you write the same top finder (inverting the logic from Friday, September 30, 2016 1:46:34 with the 5% retrace) for a Condition Formula so it would yield a true in a scan?

Thanks.

 

Bruce_L
Posted : Thursday, October 27, 2016 11:10:08 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

Please try the following for the Condition Formula.

(MAXH4.1 < H5 AND H5 = MAXH20.5 AND H5 >= 1.1 * MINL36.14 AND H >= H5 AND H5 >= L AND H5 * .95 >= MINL4.1) OR (MAXH5.1 < H6 AND H6 = MAXH20.6 AND H6 >= 1.1 * MINL36.15 AND H >= H6 AND H6 >= L AND H6 * .95 >= MINL5.1) OR (MAXH6.1 < H7 AND H7 = MAXH20.7 AND H7 >= 1.1 * MINL36.16 AND H >= H7 AND H7 >= L AND H7 * .95 >= MINL6.1) OR (MAXH7.1 < H8 AND H8 = MAXH20.8 AND H8 >= 1.1 * MINL36.17 AND H >= H8 AND H8 >= L AND H8 * .95 >= MINL7.1) OR (MAXH8.1 < H9 AND H9 = MAXH20.9 AND H9 >= 1.1 * MINL36.18 AND H >= H9 AND H9 >= L AND H9 * .95 >= MINL8.1) OR (MAXH9.1 < H10 AND H10 = MAXH20.10 AND H10 >= 1.1 * MINL36.19 AND H >= H10 AND H10 >= L AND H10 * .95 >= MINL9.1) OR (MAXH10.1 < H11 AND H11 = MAXH20.11 AND H11 >= 1.1 * MINL36.20 AND H >= H11 AND H11 >= L AND H11 * .95 >= MINL10.1) OR (MAXH11.1 < H12 AND H12 = MAXH20.12 AND H12 >= 1.1 * MINL36.21 AND H >= H12 AND H12 >= L AND H12 * .95 >= MINL11.1) OR (MAXH12.1 < H13 AND H13 = MAXH20.13 AND H13 >= 1.1 * MINL36.22 AND H >= H13 AND H13 >= L AND H13 * .95 >= MINL12.1) OR (MAXH13.1 < H14 AND H14 = MAXH20.14 AND H14 >= 1.1 * MINL36.23 AND H >= H14 AND H14 >= L AND H14 * .95 >= MINL13.1) OR (MAXH14.1 < H15 AND H15 = MAXH20.15 AND H15 >= 1.1 * MINL36.24 AND H >= H15 AND H15 >= L AND H15 * .95 >= MINL14.1) OR (MAXH15.1 < H16 AND H16 = MAXH20.16 AND H16 >= 1.1 * MINL36.25 AND H >= H16 AND H16 >= L AND H16 * .95 >= MINL15.1) OR (MAXH16.1 < H17 AND H17 = MAXH20.17 AND H17 >= 1.1 * MINL36.26 AND H >= H17 AND H17 >= L AND H17 * .95 >= MINL16.1) OR (MAXH17.1 < H18 AND H18 = MAXH20.18 AND H18 >= 1.1 * MINL36.27 AND H >= H18 AND H18 >= L AND H18 * .95 >= MINL17.1) OR (MAXH18.1 < H19 AND H19 = MAXH20.19 AND H19 >= 1.1 * MINL36.28 AND H >= H19 AND H19 >= L AND H19 * .95 >= MINL18.1) OR (MAXH19.1 < H20 AND H20 = MAXH20.20 AND H20 >= 1.1 * MINL36.29 AND H >= H20 AND H20 >= L AND H20 * .95 >= MINL19.1) OR (MAXH20.1 < H21 AND H21 = MAXH20.21 AND H21 >= 1.1 * MINL36.30 AND H >= H21 AND H21 >= L AND H21 * .95 >= MINL20.1) OR (MAXH21.1 < H22 AND H22 = MAXH20.22 AND H22 >= 1.1 * MINL36.31 AND H >= H22 AND H22 >= L AND H22 * .95 >= MINL21.1) OR (MAXH22.1 < H23 AND H23 = MAXH20.23 AND H23 >= 1.1 * MINL36.32 AND H >= H23 AND H23 >= L AND H23 * .95 >= MINL22.1) OR (MAXH23.1 < H24 AND H24 = MAXH20.24 AND H24 >= 1.1 * MINL36.33 AND H >= H24 AND H24 >= L AND H24 * .95 >= MINL23.1) OR (MAXH24.1 < H25 AND H25 = MAXH20.25 AND H25 >= 1.1 * MINL36.34 AND H >= H25 AND H25 >= L AND H25 * .95 >= MINL24.1) OR (MAXH25.1 < H26 AND H26 = MAXH20.26 AND H26 >= 1.1 * MINL36.35 AND H >= H26 AND H26 >= L AND H26 * .95 >= MINL25.1) OR (MAXH26.1 < H27 AND H27 = MAXH20.27 AND H27 >= 1.1 * MINL36.36 AND H >= H27 AND H27 >= L AND H27 * .95 >= MINL26.1) OR (MAXH27.1 < H28 AND H28 = MAXH20.28 AND H28 >= 1.1 * MINL36.37 AND H >= H28 AND H28 >= L AND H28 * .95 >= MINL27.1) OR (MAXH28.1 < H29 AND H29 = MAXH20.29 AND H29 >= 1.1 * MINL36.38 AND H >= H29 AND H29 >= L AND H29 * .95 >= MINL28.1) OR (MAXH29.1 < H30 AND H30 = MAXH20.30 AND H30 >= 1.1 * MINL36.39 AND H >= H30 AND H30 >= L AND H30 * .95 >= MINL29.1) OR (MAXH30.1 < H31 AND H31 = MAXH20.31 AND H31 >= 1.1 * MINL36.40 AND H >= H31 AND H31 >= L AND H31 * .95 >= MINL30.1) OR (MAXH31.1 < H32 AND H32 = MAXH20.32 AND H32 >= 1.1 * MINL36.41 AND H >= H32 AND H32 >= L AND H32 * .95 >= MINL31.1) OR (MAXH32.1 < H33 AND H33 = MAXH20.33 AND H33 >= 1.1 * MINL36.42 AND H >= H33 AND H33 >= L AND H33 * .95 >= MINL32.1) OR (MAXH33.1 < H34 AND H34 = MAXH20.34 AND H34 >= 1.1 * MINL36.43 AND H >= H34 AND H34 >= L AND H34 * .95 >= MINL33.1) OR (MAXH34.1 < H35 AND H35 = MAXH20.35 AND H35 >= 1.1 * MINL36.44 AND H >= H35 AND H35 >= L AND H35 * .95 >= MINL34.1) OR (MAXH35.1 < H36 AND H36 = MAXH20.36 AND H36 >= 1.1 * MINL36.45 AND H >= H36 AND H36 >= L AND H36 * .95 >= MINL35.1) OR (MAXH36.1 < H37 AND H37 = MAXH20.37 AND H37 >= 1.1 * MINL36.46 AND H >= H37 AND H37 >= L AND H37 * .95 >= MINL36.1) OR (MAXH37.1 < H38 AND H38 = MAXH20.38 AND H38 >= 1.1 * MINL36.47 AND H >= H38 AND H38 >= L AND H38 * .95 >= MINL37.1) OR (MAXH38.1 < H39 AND H39 = MAXH20.39 AND H39 >= 1.1 * MINL36.48 AND H >= H39 AND H39 >= L AND H39 * .95 >= MINL38.1) OR (MAXH39.1 < H40 AND H40 = MAXH20.40 AND H40 >= 1.1 * MINL36.49 AND H >= H40 AND H40 >= L AND H40 * .95 >= MINL39.1) OR (MAXH40.1 < H41 AND H41 = MAXH20.41 AND H41 >= 1.1 * MINL36.50 AND H >= H41 AND H41 >= L AND H41 * .95 >= MINL40.1) OR (MAXH41.1 < H42 AND H42 = MAXH20.42 AND H42 >= 1.1 * MINL36.51 AND H >= H42 AND H42 >= L AND H42 * .95 >= MINL41.1)

And the following to plot the dots on the chart.

H / ABS((MAXH4.1 < H5 AND H5 = MAXH20.5 AND H5 >= 1.1 * MINL36.14 AND H >= H5 AND H5 >= L AND H5 * .95 >= MINL4.1) OR (MAXH5.1 < H6 AND H6 = MAXH20.6 AND H6 >= 1.1 * MINL36.15 AND H >= H6 AND H6 >= L AND H6 * .95 >= MINL5.1) OR (MAXH6.1 < H7 AND H7 = MAXH20.7 AND H7 >= 1.1 * MINL36.16 AND H >= H7 AND H7 >= L AND H7 * .95 >= MINL6.1) OR (MAXH7.1 < H8 AND H8 = MAXH20.8 AND H8 >= 1.1 * MINL36.17 AND H >= H8 AND H8 >= L AND H8 * .95 >= MINL7.1) OR (MAXH8.1 < H9 AND H9 = MAXH20.9 AND H9 >= 1.1 * MINL36.18 AND H >= H9 AND H9 >= L AND H9 * .95 >= MINL8.1) OR (MAXH9.1 < H10 AND H10 = MAXH20.10 AND H10 >= 1.1 * MINL36.19 AND H >= H10 AND H10 >= L AND H10 * .95 >= MINL9.1) OR (MAXH10.1 < H11 AND H11 = MAXH20.11 AND H11 >= 1.1 * MINL36.20 AND H >= H11 AND H11 >= L AND H11 * .95 >= MINL10.1) OR (MAXH11.1 < H12 AND H12 = MAXH20.12 AND H12 >= 1.1 * MINL36.21 AND H >= H12 AND H12 >= L AND H12 * .95 >= MINL11.1) OR (MAXH12.1 < H13 AND H13 = MAXH20.13 AND H13 >= 1.1 * MINL36.22 AND H >= H13 AND H13 >= L AND H13 * .95 >= MINL12.1) OR (MAXH13.1 < H14 AND H14 = MAXH20.14 AND H14 >= 1.1 * MINL36.23 AND H >= H14 AND H14 >= L AND H14 * .95 >= MINL13.1) OR (MAXH14.1 < H15 AND H15 = MAXH20.15 AND H15 >= 1.1 * MINL36.24 AND H >= H15 AND H15 >= L AND H15 * .95 >= MINL14.1) OR (MAXH15.1 < H16 AND H16 = MAXH20.16 AND H16 >= 1.1 * MINL36.25 AND H >= H16 AND H16 >= L AND H16 * .95 >= MINL15.1) OR (MAXH16.1 < H17 AND H17 = MAXH20.17 AND H17 >= 1.1 * MINL36.26 AND H >= H17 AND H17 >= L AND H17 * .95 >= MINL16.1) OR (MAXH17.1 < H18 AND H18 = MAXH20.18 AND H18 >= 1.1 * MINL36.27 AND H >= H18 AND H18 >= L AND H18 * .95 >= MINL17.1) OR (MAXH18.1 < H19 AND H19 = MAXH20.19 AND H19 >= 1.1 * MINL36.28 AND H >= H19 AND H19 >= L AND H19 * .95 >= MINL18.1) OR (MAXH19.1 < H20 AND H20 = MAXH20.20 AND H20 >= 1.1 * MINL36.29 AND H >= H20 AND H20 >= L AND H20 * .95 >= MINL19.1) OR (MAXH20.1 < H21 AND H21 = MAXH20.21 AND H21 >= 1.1 * MINL36.30 AND H >= H21 AND H21 >= L AND H21 * .95 >= MINL20.1) OR (MAXH21.1 < H22 AND H22 = MAXH20.22 AND H22 >= 1.1 * MINL36.31 AND H >= H22 AND H22 >= L AND H22 * .95 >= MINL21.1) OR (MAXH22.1 < H23 AND H23 = MAXH20.23 AND H23 >= 1.1 * MINL36.32 AND H >= H23 AND H23 >= L AND H23 * .95 >= MINL22.1) OR (MAXH23.1 < H24 AND H24 = MAXH20.24 AND H24 >= 1.1 * MINL36.33 AND H >= H24 AND H24 >= L AND H24 * .95 >= MINL23.1) OR (MAXH24.1 < H25 AND H25 = MAXH20.25 AND H25 >= 1.1 * MINL36.34 AND H >= H25 AND H25 >= L AND H25 * .95 >= MINL24.1) OR (MAXH25.1 < H26 AND H26 = MAXH20.26 AND H26 >= 1.1 * MINL36.35 AND H >= H26 AND H26 >= L AND H26 * .95 >= MINL25.1) OR (MAXH26.1 < H27 AND H27 = MAXH20.27 AND H27 >= 1.1 * MINL36.36 AND H >= H27 AND H27 >= L AND H27 * .95 >= MINL26.1) OR (MAXH27.1 < H28 AND H28 = MAXH20.28 AND H28 >= 1.1 * MINL36.37 AND H >= H28 AND H28 >= L AND H28 * .95 >= MINL27.1) OR (MAXH28.1 < H29 AND H29 = MAXH20.29 AND H29 >= 1.1 * MINL36.38 AND H >= H29 AND H29 >= L AND H29 * .95 >= MINL28.1) OR (MAXH29.1 < H30 AND H30 = MAXH20.30 AND H30 >= 1.1 * MINL36.39 AND H >= H30 AND H30 >= L AND H30 * .95 >= MINL29.1) OR (MAXH30.1 < H31 AND H31 = MAXH20.31 AND H31 >= 1.1 * MINL36.40 AND H >= H31 AND H31 >= L AND H31 * .95 >= MINL30.1) OR (MAXH31.1 < H32 AND H32 = MAXH20.32 AND H32 >= 1.1 * MINL36.41 AND H >= H32 AND H32 >= L AND H32 * .95 >= MINL31.1) OR (MAXH32.1 < H33 AND H33 = MAXH20.33 AND H33 >= 1.1 * MINL36.42 AND H >= H33 AND H33 >= L AND H33 * .95 >= MINL32.1) OR (MAXH33.1 < H34 AND H34 = MAXH20.34 AND H34 >= 1.1 * MINL36.43 AND H >= H34 AND H34 >= L AND H34 * .95 >= MINL33.1) OR (MAXH34.1 < H35 AND H35 = MAXH20.35 AND H35 >= 1.1 * MINL36.44 AND H >= H35 AND H35 >= L AND H35 * .95 >= MINL34.1) OR (MAXH35.1 < H36 AND H36 = MAXH20.36 AND H36 >= 1.1 * MINL36.45 AND H >= H36 AND H36 >= L AND H36 * .95 >= MINL35.1) OR (MAXH36.1 < H37 AND H37 = MAXH20.37 AND H37 >= 1.1 * MINL36.46 AND H >= H37 AND H37 >= L AND H37 * .95 >= MINL36.1) OR (MAXH37.1 < H38 AND H38 = MAXH20.38 AND H38 >= 1.1 * MINL36.47 AND H >= H38 AND H38 >= L AND H38 * .95 >= MINL37.1) OR (MAXH38.1 < H39 AND H39 = MAXH20.39 AND H39 >= 1.1 * MINL36.48 AND H >= H39 AND H39 >= L AND H39 * .95 >= MINL38.1) OR (MAXH39.1 < H40 AND H40 = MAXH20.40 AND H40 >= 1.1 * MINL36.49 AND H >= H40 AND H40 >= L AND H40 * .95 >= MINL39.1) OR (MAXH40.1 < H41 AND H41 = MAXH20.41 AND H41 >= 1.1 * MINL36.50 AND H >= H41 AND H41 >= L AND H41 * .95 >= MINL40.1) OR (MAXH41.1 < H42 AND H42 = MAXH20.42 AND H42 >= 1.1 * MINL36.51 AND H >= H42 AND H42 >= L AND H42 * .95 >= MINL41.1))



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
truetrend
Posted : Thursday, October 27, 2016 3:17:32 PM
Registered User
Joined: 6/16/2005
Posts: 131

The last formula to draw the dots generates an error (divide by 0).

Bruce_L
Posted : Thursday, October 27, 2016 3:20:48 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

That is intentional. It makes it so it doesn't draw a dot when the condition upon which it is based is not true.

The way it works is that it takes the high of the bar and divides it by either 1 if true or 0 if false. Because the division by zero produces an error, it doesn't draw a dot when false.

You can eliminate the error message by turning the H / ABS( at the beginning into an H * ABS( instead, but this is not desirable because you would end up with a row of dots at 0 when the condition upon which it is based is false.

This is the way the formulas for the dots worked for the inverse of this provided earlier. You indicated this was working nicely for you.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
truetrend
Posted : Thursday, October 27, 2016 6:09:16 PM
Registered User
Joined: 6/16/2005
Posts: 131

Thanks a ton.  Between the dots and the ability to scan for possible plays, these codes are very helpful.

One issue I would like you to look at.  Look at today's charts (10/27 daily EOD) for both MEET &  MJN.  Both appeared on my dbl btm scan.  Plot just the red top line.  Notice the way it dives to the lows on 10/21/16 on MEET & on 10/5/16 on MJN.  

There are also weird prints of the top red line on CONE & ORI.

OCLR & CLF have similiar weird behavior with the bottom finder lines.  Any ideas?

Bruce_L
Posted : Friday, October 28, 2016 10:25:10 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

It drops like that because the lookback is is either 47 or 50 bars depending on how you are counting. If the most recent peak for which the other requirements were met was more than 50 bars ago, it can't be detected, so the value drops to 0.

I pointed this limitation out when first providing the formulas. It is why I suggested editing price and setting Calculate Scale from Price Only.

 



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.