Registered User Joined: 3/10/2012 Posts: 465
|
Bruce how do i shorten this formula in newer version please
(H > H1 AND L1 < MINL21.2) OR (H > H2 AND H1 <= H2 AND L2 < MINL21.3) OR (H > H3 AND MAXH2.1 <= H3 AND L3 < MINL21.4) OR (H > H4 AND MAXH3.1 <= H4 AND L4 < MINL21.5) OR (H > H5 AND MAXH4.1 <= H5 AND L5 < MINL21.6) OR (H > H6 AND MAXH5.1 <= H6 AND L6 < MINL21.7)
(L < L1 AND H1 > MAXH21.2) OR (L < L2 AND L1 >= L2 AND H2 > MAXH21.3) OR (L < L3 AND MINL2.1 >= L3 AND H3 > MAXH21.4) OR (L < L4 AND MINL3.1 >= L4 AND H4 > MAXH21.5) OR (L < L5 AND MINL4.1 >= L5 AND H5 > MAXH21.6) OR (L < L6 AND MINL5.1 >= L6 AND H6 > MAXH21.7)
thanks
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I don't see a way to shorten either formula using the new syntax.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/10/2012 Posts: 465
|
Okay no problem will keep them as is... thanks
A second question your posted formula for opening Marubozu candle how come it did not pick up this bar , what to change in pcf so that it picks up highlighted bar in the link attached
https://www.dhirenshah.com/opening-marubozu/
https://www.dhirenshah.com/opening-marubozu-with-minor-low-wick/
your candle formula from forum
H > C AND O = L AND C - O > 3 * AVG(ABS(O - C), 15) / 2
thanks a lot
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I guess we could write some sort of "near" version of the formula.
H > C AND 19 * (O - L) <= H - L AND C - O > 3 * AVG(ABS(O1 - C1), 15) / 2
It checks for the lower wick to be 1/19th of the entire candle at most. I tried 5% or 1/20th first, but while it worked for the first chart, the minor low wick on the second chart was actually more than 5% of the candle.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/10/2012 Posts: 465
|
Ok Bruce that works thankyou
Also i m trying to get the greenest bar that is long with heavy body like attached so how to write that ?? and wicks on either side is fine
https://www.dhirenshah.com/greeniest-bar/
https://www.dhirenshah.com/greeniest-candle-in-last-20-bars-with-heavy-body-wick-okay-on-either-side/
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The size of the largest green candle (my assumption is Color Based On is set to Open vs Close) in the most recent 100 bars can be written as follows.
MAX(C - O, 20)
If the value of the above is negative then there weren't any green candles.
We can write a formula for how many bars ago the largest green candle was using the following formula.
IIF(C >= O AND C - O = MAX(C - O, 20), 0, IIF(C1 >= O1 AND C1 - O1 = MAX(C - O, 20), 1, IIF(C2 >= O2 AND C2 - O2 = MAX(C - O, 20), 2, IIF(C3 >= O3 AND C3 - O3 = MAX(C - O, 20), 3, IIF(C4 >= O4 AND C4 - O4 = MAX(C - O, 20), 4, IIF(C5 >= O5 AND C5 - O5 = MAX(C - O, 20), 5, IIF(C6 >= O6 AND C6 - O6 = MAX(C - O, 20), 6, IIF(C7 >= O7 AND C7 - O7 = MAX(C - O, 20), 7, IIF(C8 >= O8 AND C8 - O8 = MAX(C - O, 20), 8, IIF(C9 >= O9 AND C9 - O9 = MAX(C - O, 20), 9, IIF(C10 >= O10 AND C10 - O10 = MAX(C - O, 20), 10, IIF(C11 >= O11 AND C11 - O11 = MAX(C - O, 20), 11, IIF(C12 >= O12 AND C12 - O12 = MAX(C - O, 20), 12, IIF(C13 >= O13 AND C13 - O13 = MAX(C - O, 20), 13, IIF(C14 >= O14 AND C14 - O14 = MAX(C - O, 20), 14, IIF(C15 >= O15 AND C15 - O15 = MAX(C - O, 20), 15, IIF(C16 >= O16 AND C16 - O16 = MAX(C - O, 20), 16, IIF(C17 >= O17 AND C17 - O17 = MAX(C - O, 20), 17, IIF(C18 >= O18 AND C18 - O18 = MAX(C - O, 20), 18, IIF(C19 >= O19 AND C19 - O19 = MAX(C - O, 20), 19, -1))))))))))))))))))))
Again, if the value is negative (specifically -1 in this case), then there weren't any green candles.
If you just want to identify a big green candle as a condition.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/10/2012 Posts: 465
|
Bruce this is fantastic.... thankyou very much and yes the bars i always use is open vs close
Can u please do the IFF version for negative bars where CLOSE IS BELOW OPEN
Because if i try doing the pcf i will surely screw up
cheers
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Please try the following.
IIF(O > C AND O - C = MAX(O - C, 20), 0, IIF(O1 > C1 AND O1 - C1 = MAX(O - C, 20), 1, IIF(O2 > C2 AND O2 - C2 = MAX(O - C, 20), 2, IIF(O3 > C3 AND O3 - C3 = MAX(O - C, 20), 3, IIF(O4 > C4 AND O4 - C4 = MAX(O - C, 20), 4, IIF(O5 > C5 AND O5 - C5 = MAX(O - C, 20), 5, IIF(O6 > C6 AND O6 - C6 = MAX(O - C, 20), 6, IIF(O7 > C7 AND O7 - C7 = MAX(O - C, 20), 7, IIF(O8 > C8 AND O8 - C8 = MAX(O - C, 20), 8, IIF(O9 > C9 AND O9 - C9 = MAX(O - C, 20), 9, IIF(O10 > C10 AND O10 - C10 = MAX(O - C, 20), 10, IIF(O11 > C11 AND O11 - C11 = MAX(O - C, 20), 11, IIF(O12 > C12 AND O12 - C12 = MAX(O - C, 20), 12, IIF(O13 > C13 AND O13 - C13 = MAX(O - C, 20), 13, IIF(O14 > C14 AND O14 - C14 = MAX(O - C, 20), 14, IIF(O15 > C15 AND O15 - C15 = MAX(O - C, 20), 15, IIF(O16 > C16 AND O16 - C16 = MAX(O - C, 20), 16, IIF(O17 > C17 AND O17 - C17 = MAX(O - C, 20), 17, IIF(O18 > C18 AND O18 - C18 = MAX(O - C, 20), 18, IIF(O19 > C19 AND O19 - C19 = MAX(O - C, 20), 19, -1))))))))))))))))))))
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/10/2012 Posts: 465
|
Thanks Bruce everything works fine ,
Cheers
|
|
Registered User Joined: 3/10/2012 Posts: 465
|
Bruce i m sure there is a formula for this in terms of ratio 1 :1, how to write
"CURRENT Body Size of the Green Bar relative to the Body size of the green bars to the left of it, is greater then 1 and that pcf checking should go upto 50 bars to the left
I m not looking for wicks here i m looking for Open and close being greater then open and close relative to its past green bars
I only could write it like this for current bar but how to check for past
100 * ABS(C - O) / (H - L)
And same i need for the red bars too
thanks
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I was going to make a few guesses, but I really don't know what is being asked at all.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/10/2012 Posts: 465
|
Bruce please see the link
https://www.dhirenshah.com/fat-green-bars-relative-to-green-bars-of-past-to-its-left-comparison/
https://www.dhirenshah.com/fat-green-bars-relative-to-green-bars-of-past-to-its-left/
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I still don't know what you want. I will assume that a bar where the body is at least 75% of the candle is a "fat bar". OK. What is the formula supposed to return as a value and when is it supposed to return this value?
Do you want to count the number of bars meeting this requirement is the most recent 50 bars?
Do you want to find the most recent time this happened prior to the current bar and return how many bars ago this was as long as the current bar also meets the requirements?
Are you looking for how many bars back until you find a bar with a higher percentage than the current bar?
Do you want to return the actual percentage of the most recent bar besides the current bar meeting the requirements?
I have no idea whatsoever from what you have indicated so far what you actually want the formula to do.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/10/2012 Posts: 465
|
Okay Bruce the formula is suppose to return a SPIKE when two things happen(ypu can give e two seperate pcf if you wish)
IF current green bar body was greater in percentage value compare to the green bar body of past
so example of CHS on daily as link given above it was 75% when i posted and previous one on OCT 30,2018 was 80.52% on daily chart
But as of now the CHS body has grown to 87% which is greater then 80.52% of past fat bar
so thats where PCF's should return as true
second PCF the current green bar body must be greater in %tage comparison to all the only green bodies compared within last 50 bars and returned spike (so that includes hammer, doji, or all the wick bars that you see in the image )
and need same for RED bars
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Maybe the following for green bars?
C > O AND (C - O) / (H - L) > MAX((C1 - O1) / (H1 - L1), 50) AND MAX((C1 - O1) / (H1 - L1), 50) >= .75
And the following for red bars?
O > C AND (O - C) / (H - L) > MAX((O1 - C1) / (H1 - L1), 50) AND MAX((O1 - C1) / (H1 - L1), 50) >= .75
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/10/2012 Posts: 465
|
Thankyou Bruce you never disappoint , appreciate everything i can tweak with pcf and work with it,
Lastly can u please write inverse of this formula
ABS(C > O) * (O - L) + ABS(C < O) * (C - L)
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I think a better way to write the original would be the following.
LEAST(O, C) - L
So maybe the following for the inverse?
H - GREATEST(O, C)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/10/2012 Posts: 465
|
Yup that works
thanks
Cheers
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |