Scan Confusion
I was writing a scan to compare absolute values of daily lows and highs. I wrote this scan and clicked on check syntax....and it came back with YOUR SCAN SYNTAX IS CORRECT ! How can this occur with one less right hand bracket in the third line vrs the second line ? Enter the statements below as a scan and see for yourself.
[type = stock] AND [Daily SMA(20,Daily Volume) >200000]
and [[AbsVal(high)- AbsVal(low)]< [AbsVal(1 day ago high)- AbsVal(1 day ago low)]]
and [[AbsVal(high)- AbsVal(low)]< [AbsVal(2 day ago high)- AbsVal(2 day ago low)]
Any thoughts ?
Thanks,
JJ
]
[type = stock] AND [Daily SMA(20,Daily Volume) >200000]
and [[AbsVal(high)- AbsVal(low)]< [AbsVal(1 day ago high)- AbsVal(1 day ago low)]]
and [[AbsVal(high)- AbsVal(low)]< [AbsVal(2 day ago high)- AbsVal(2 day ago low)]
Any thoughts ?
Thanks,
JJ
]
0
Comments
-
I get a syntax error for mismatched square brackets. I don't know why you would have gotten an 'ok' message. It's possible you "mis-clicked" somehow (e.g. the cursor wasn't where you thought it was, or you left-clicked instead of right-clicked, or...) so you didn't actually send the revision and the 'ok' message was left over from the previous successful check because the screen didn't refresh. But, I'm just guessing.
I do have a question about the scan, however.
Your parameters inside your absval function - high, low, 1 day ago high, 1 day ago low - are all positive numbers, so the absval function is unnecessary.
Maybe you were thinking of:
and [absval(high - low) < absval( 1 day ago high - 1 day ago low)]
but, high - low will always be a positive number also (or sometimes 0), so absval is not necessary there either.
I think what you want is:
and [range < 1 day ago range]
and [range < 2 days ago range]
or, you could also write
and [range = min(3, range)]
although that is slightly different, in that two - or all three - values could be equal and the most recent would still be the min 3.
0
Categories
- All Categories
- 2.4K StockCharts
- 397 SharpCharts
- 146 Other Charting Tools
- 69 Saved Charts and ChartLists
- 1.5K Scanning
- 74 Data Issues
- 177 Other StockCharts Questions
- 224 Technical Analysis
- 155 Using Technical Analysis
- 6 InterMarket and International
- 19 Market and Breadth Indicators
- 44 Market Analysis
- 109 Trading
- 109 Trading Strategies
- 162 S.C.A.N the StockCharts Answer Network forum
- 64 Using this StockCharts Answer Network forum
- 98 s.c.a.n. archives
- 7 Off-Topic
- 7 The Cogitation & Rumination Emporium
- Forum Test Area
