SurfnDestiny 78 posts msg #33626  Ignore SurfnDestiny 
10/22/2004 7:18:22 PM
Looking for help on syntax
I`m trying to write a filter to look at center of gravity peaking negatively to show a reversal in stock price. can`t get lag or days ago to work.
SHOW STOCKS WHERE CLOSE HAS BEEN DECREASING OVER THE LAST 3 DAYS
and AVERAGE VOLUME(90)IS ABOVE 30,000
and CLOSE PRICE IS BETWEEN 1 AND 100
and PRICE TOUCHED LOWER BOLLINGER BAND(20)
and slope of COG(10,7) is below 1.0 lag 1 day
and slope of COG(10,7) is above 1.0
and COG(10,7) is below .1
or
SHOW STOCKS WHERE CLOSE HAS BEEN DECREASING OVER THE LAST 3 DAYS
and AVERAGE VOLUME(90)IS ABOVE 30,000
and CLOSE PRICE IS BETWEEN 1 AND 100
and PRICE TOUCHED LOWER BOLLINGER BAND(20)
and slope of COG(10,7) is below 1.0 1 day ago
and slope of COG(10,7) is above 1.0
and COG(10,7) is below .1
any help would be appreciated.

SurfnDestiny 78 posts msg #33628  Ignore SurfnDestiny 
10/22/2004 8:03:06 PM
This kind of does the same thing, but would like to work with the slope function.
SHOW STOCKS WHERE CLOSE HAS BEEN DECREASING OVER THE LAST 3 DAYS
and AVERAGE VOLUME(90)IS ABOVE 30,000
and CLOSE PRICE IS BETWEEN 1 AND 100
and PRICE TOUCHED LOWER BOLLINGER BAND(20)
and COG(10,7) has been decreasing for 2 days lag 1 day
and COG(10,7) has been increasing for 1 day
and COG(10,7) is below .05
Will the lag function not work with the slope function?.

xplorer 257 posts msg #33629  Ignore xplorer 
10/22/2004 8:05:43 PM
Your syntax is correct ... but the chart would need a "broken neck" pattern that is impossible.... You are looking for a negative slope using the last 10 days ... then a positive slope also using 9 of the same days (plus the 1 day different date)... not going to happen.
Try playing with a longer lag ... or different parameters of your slope ... like hmmm 14 days on one ... and 10 on the second ????
Good luck ...

SurfnDestiny 78 posts msg #33644  Ignore SurfnDestiny 
10/23/2004 6:18:23 PM
I don`t see how you find ten days ago in the equations. what I want it to do is see a negative slope yesterday followed by a positive slope today. The slope command will allow me to filter out slower falling or rising signals.
I do have the negative slope equation in the third set spanning two days. that is just a variable for how many days the slope must stay negative. I should have made it a single day to match the previous examples.
The third filter example works. the lag works correctly. but the lag command seems to be ignored when in the same line as a slope command. If that is true, its too bad, because the slope command is a powerful way of manipulating your filter charactoristics, and combined with the lag command you could look at the rise angle of different signals at different times in relation to each other.

SurfnDestiny 78 posts msg #33646  Ignore SurfnDestiny 
10/23/2004 6:46:54 PM
rtuckers post in this forum showed me the correct syntax.
SHOW STOCKS WHERE CLOSE HAS BEEN DECREASING OVER THE LAST 3 DAYS
and AVERAGE VOLUME(90)IS ABOVE 30,000
and CLOSE PRICE IS BETWEEN 1 AND 100
and PRICE TOUCHED LOWER BOLLINGER BAND(20)
and 1 day slope of COG(10,7) 1 day ago is < 0
and 1 day slope of COG(10,7) is > 0
this formula now works. just need to tweak it properly.

xplorer 257 posts msg #33648  Ignore xplorer 
10/23/2004 8:21:52 PM
I was looking at the COG(10,2) as being a 10 day period using a 2 day EMA. I guess I need to read up on this one ... didn't mean to add any confusion ... but to be honest , now I am a little confused as how the COG is used. I'm glad you found the answer ,,, and thanks for posting the correct version ! I'm going to have to work with your scan, so I can understand this one.... The results look good !!
Thanks !

SurfnDestiny 78 posts msg #33650  Ignore SurfnDestiny 
10/23/2004 9:11:28 PM
It works.... but only to a certain extent. When tweaking, I get erratic data back. The slope function seems to not work well with the center of gravity signal. If I input a value above .2 or below .2 in the slope equation I get no results, although that is not that steep of an angle. Also, I tried to use the following:
COG(10,7) crossed above COG EMA(10,7)
This is to detect the faster COG signal crossing above the slower COG signal which indicates a price reversal, like with stochastics, but for some reason that equation is not working. I probably have the syntax incorrect.
Is there a set of programming rules of syntax somewhere on this site?. It would be helpful to have as a referance.

xplorer 257 posts msg #33652  Ignore xplorer 
10/23/2004 9:23:20 PM
Yepher has posted a nice set of the rules of StockFetcher:
http://yepher.com/~yepher/stockfetcher/command.html

SurfnDestiny 78 posts msg #33655  Ignore SurfnDestiny 
10/23/2004 10:33:02 PM
thanks. I`ll go download them.

rtucker 318 posts msg #33710  Ignore rtucker 
10/28/2004 4:06:07 AM
add column 1 day slope of cog(10,7)
try adding this line to the end of your filter so you can see the returned values and get a feel for slopes. it appears that 2 day slopes are minimum. no difference in values between 1 and 2 day slopes.
