This alert is set up to run on a list I created which holds the indexes such as NDX, SOX,XLK,SPX and a few others. It has alerted me several times this morning but as you can clearly see, none of these were below their SMA(14) today. As you know I have had this problem before but this is a much smaller alert and maybe whatever it is wrong is easier to see? NDX and SOX were the last two to trigger this alert today.
[Favorites list is 33]
and [[Close < SMA(14)]
and [High > [[1 Day ago High + 1 Day ago Low] / 2.0]]
and [[MACD Hist(12,26,9) < 1 Day ago MACD Hist(12,26,9)] or [MACD Line(12,26,9) < 1 Day ago MACD Line(12,26,9)]]
and [[MACD Hist(48,103,36) < 1 Day ago MACD Hist(48,103,36)] and [MACD Line(48,103,36) < 1 Day ago MACD Line(48,103,36)]]
and [MACD Hist(72,156,54) < 1 Day ago MACD Hist(72,156,54)]
and [MACD Hist(60,130,0) < 1 Day ago MACD Hist(60,130,0)]
and [MACD Hist(72,156,0) < 1 Day ago MACD Hist(72,156,0)]]
0
Comments
Even if you run just the first line of the scan, it gets hits on symbols where the close is clearly higher.
For past bars, indicators only show the ending value for the bar in question, not all the intermediate values that occurred while the bar was still "live". This is unlike price bars, which show the range of prices hit during the bar, not just the final value.
It's possible the alerts are based on those intermediate (disappearing) values, while the scans use the "end of bar" values.
Also, as I've mentioned before, I think, possibly your scans have more conditions or longer parameters than the scan or alert engine can handle. Unfortunately, as far as I know, the language limits are undocumented. The editor only checks for syntax errors, not logic or calculation limits, and apparently if there is a problem during run time it doesn't throw errors as a "real" language would.
If you want to pursue it further, you could test scan vs. alert with very simple scans, e.g. MACD Line x MACD Signal with default parameters, and see if the same problem arises. If it does, then as you say, there is may be a difference between scans and alerts (although the different data problem is still there, so it's not conclusive). If it doesn't, if they both trigger around the same time (accounting for the delay in getting the alert to you, vs. the scan results) then the "too complex" situation is more likely.