New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.
and it produced results that are clearly not correct, for example the Tickers AB and ABEV were one of many that was included in the results. can you please help thanks
The results for the symbols you mention appear to be correct, assuming you ran the scan after the close for 7/12.
For AB the high on 7/12 was 30.95.
30.95 * 0.98 = 30.33
AB's close was 30.49 which is greater than 30.33.
For ABEV, the high on 7/12 was 4.93.
4.93 * 0.98 = 4.83
ABEV's close was 4.84, which is greater than 4.83.
I'm just guessing, but I wonder if you were thinking that "high" meant something other than the current bar's high, like the week's high, or 52 week high, or all-time high?
When there is no modifier in front of "high", like "weekly high" or "monthly high", then the default is "daily" (in other words, if you don't specify otherwise, the scan engine assumes you want the most recent daily value).
If that doesn't answer your question, let me know.
thank you mark for your reply, I should have done the math math to confirm before asking here on the forum sorry for the troubles
I am trying to include a clause that will produce results that contain a bullish bar where it closed near the high and in aforementioned tickers it clearly closed near the low.
I will keep experimenting but if anyone can help I will be thankful
Well, I think the code for "Close Near Daily High" on the link you posted is not the best possible solution for the problem, and maybe I missed that that was what you were getting at:
I think it should be something like:
and [ close > low + [range * .98]]
The .98 parameter is pretty restrictive. You might want .75 or so.
You can also determine the nature of the bar, if you want:
UP -
and [high > yesterday's high] and [low > yesterday's low]
GAP UP (no range overlap at all]
and [low > yesterday's high]
DOWN
and [high < yesterday's high] and [low < yesterday's low]
GAP DOWN (no range overlap)
and [high < yesterday's low]
INSIDE
and [high < yesterday's high] ans [low > yesterday's low]
OUTSIDE
and [high > yesterday's high] and [low < yesterday's low]
If you want to determine whether the open and close are far apart (i.e. the candle body is most of the candle length), you could try
and [Long Body is True]
I'm just assuming that works with inside and outside bars, and bars of small range - I'm not sure.
Also, you can determine whether the range was unusual by comparing it to ATR (average true range) for a specified period.
For instance, was the bar wider that the average true range in the last month (21 trading days) by some amount:
Comments
The results for the symbols you mention appear to be correct, assuming you ran the scan after the close for 7/12.
For AB the high on 7/12 was 30.95.
30.95 * 0.98 = 30.33
AB's close was 30.49 which is greater than 30.33.
For ABEV, the high on 7/12 was 4.93.
4.93 * 0.98 = 4.83
ABEV's close was 4.84, which is greater than 4.83.
I'm just guessing, but I wonder if you were thinking that "high" meant something other than the current bar's high, like the week's high, or 52 week high, or all-time high?
When there is no modifier in front of "high", like "weekly high" or "monthly high", then the default is "daily" (in other words, if you don't specify otherwise, the scan engine assumes you want the most recent daily value).
If that doesn't answer your question, let me know.
I am trying to include a clause that will produce results that contain a bullish bar where it closed near the high and in aforementioned tickers it clearly closed near the low.
I will keep experimenting but if anyone can help I will be thankful
Well, I think the code for "Close Near Daily High" on the link you posted is not the best possible solution for the problem, and maybe I missed that that was what you were getting at:
I think it should be something like:
and [ close > low + [range * .98]]
The .98 parameter is pretty restrictive. You might want .75 or so.
You can also determine the nature of the bar, if you want:
UP -
and [high > yesterday's high]
and [low > yesterday's low]
GAP UP (no range overlap at all]
and [low > yesterday's high]
DOWN
and [high < yesterday's high]
and [low < yesterday's low]
GAP DOWN (no range overlap)
and [high < yesterday's low]
INSIDE
and [high < yesterday's high]
ans [low > yesterday's low]
OUTSIDE
and [high > yesterday's high]
and [low < yesterday's low]
If you want to determine whether the open and close are far apart (i.e. the candle body is most of the candle length), you could try
and [Long Body is True]
I'm just assuming that works with inside and outside bars, and bars of small range - I'm not sure.
Also, you can determine whether the range was unusual by comparing it to ATR (average true range) for a specified period.
For instance, was the bar wider that the average true range in the last month (21 trading days) by some amount:
and [range > atr(21) * 1.5]
Or was the range less than ATR(21)
and [range < atr(21) * 0.5]
you have been a great help Sir, thank you