Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 10/19/2016 Posts: 8
|
Hi Bruce,
Please advise on how to create the script for the following
Bullish Pinbar:
1) the open and close happens only in the top 1/3 of the candle range.
2) does matter if close above/below open, as long as body resides in top 1/3 of range.
3) without using ABS()
Bullish Icecream Bar:
1) the body is at least 50% of range
2) close must be in top 1/3 of range
3) without using ABS ()
|
|
Registered User Joined: 10/19/2016 Posts: 8
|
Hi Bruce,
If the use of ABS() is a must, then lets go ahead with that option.
i tried editing the hangman PCF >>
ABS(C >= O) * O + ABS(C < O) * C - L >= 2 * ABS(C - O) AND (C + O) / 2 - L > 2 * (H - (C + O) / 2) AND ABS(C - O) > .01
But i could not figure out how to have the body reside in top 1/3 of range.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The open and close being in the top third of the candle can be written as follows without using the ABS() function.
3 * O >= 2 * H + L AND 3 * C >= 2 * H + L AND H > L
The body being at least 50% of the range with the close in the top third of the candle can be written as follows without using the ABS() function.
2 * (C - O) >= H - L AND 3 * C >= 2 * H + L AND H > L
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/19/2016 Posts: 8
|
Thank you Bruce! You are awesome! :)
|
|
Registered User Joined: 10/19/2016 Posts: 8
|
Sorry Bruce, would you kindly also provide the bearish version for both the pinbar and the icecream?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The open and close being in the bottom third of the candle can be written as follows without using the ABS() function.
3 * O <= H + 2 * L AND 3 * C <= H + 2 * L AND H > L
The body being at least 50% of the range with the close in the bottom third of the candle can be written as follows without using the ABS() function.
2 * (O - C) >= H - L AND 3 * C <= H + 2 * L AND H > L
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/19/2016 Posts: 8
|
thank you.
i create a pcf to scan for candlestick whose:
1) body is at least 67% of range
2) close in the top 1/3 of range
came up with this:
(C-O)>=.67*(H-L)
seems to work fine, but do you see a better pcf variation?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You don't need the parentheses on the C - O portion, but otherwise, it seems like it is as short as it is going to get. I would add the H > L portion to make sure the candle actually has range.
C - O >= .67 * (H - L) AND H > L
If you wanted the body to be two thirds of the candle instead of rounding to 67%, you could do that as well.
3 * (C - O) >= 2 * (H - L) AND H > L
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |