Registered User Joined: 10/2/2005 Posts: 30
|
Hi,
How would you code for stock on the 200SMA with a long lower shadow?
Thanks, Kaveh
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I'm not a candlestick expert by any means, but I'll give it a try.
QUOTE (kaveh) ... on the 200SMA ... I'm going to interpret this as 200-Period Simple Moving Average of the Closing Price intersecting the Candle Body:
(O >= AVGC200 AND AVGC200 >= C) OR (C >= AVGC200 AND AVGC200 >= O)
QUOTE (kaveh) ... long lower shadow ... I'm going to interpret this as the Lower Shadow being at least twice the size of the Body:
(O + C - ABS(O - C)) / 2 - L >= 2 * ABS(O - C)
You can combine these conditions to get the following:
((O >= AVGC200 AND AVGC200 >= C) OR (C >= AVGC200 AND AVGC200 >= O)) AND (O + C - ABS(O - C)) / 2 - L >= 2 * ABS(O - C)
If this does not meet your needs we can alter it as appropriate. For example, we could make it less restrictive by checking for the 200-Period Simple Moving Average to intersect the entire candle instead of just the body:
H >= AVGC200 AND AVGC200 >= L AND (O + C - ABS(O - C)) / 2 - L >= 2 * ABS(O - C)
You may wish to review the following:
How to create a Personal Criteria Forumula (PCF) Handy PCF example formulas to help you learn the syntax of PCFs! Boolean PCFs for Candlestick Patterns PCFs and EasyScans for Candlestick Patterns
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Registered User Joined: 10/2/2005 Posts: 30
|
Looks promising. Thanks.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome. Just let us know if other conditions would meet your needs better and we'll do what we can.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|