StockFetcher Forums · General Discussion · Problem with counting close<< >>Post Follow-up
fokane
74 posts
msg #58604
Ignore fokane
12/29/2007 8:58:56 AM

I am stuck on a problem with my filter, maybe someone can help?
The basic filter below demonstrates the issue.
It counts the number of times MA(5) crosses a horizontal line on the chart.
If I use a constant literal value to define the line it works correctly.
However I want to define the line as a variable related to the close and when I do this the count is incorrect.
It's driving me mad!

Good Count:

Fetcher[
apply to symlist(KO,MCD,BKC)
set{ct,close 1 day ago}
set{myline,58.5}
/*set{myline,ct - 1}*/
set{mycrossVar,count(MA(5) crossed above myline,100)}
add column mycrossVar
and draw MA(5)
and draw price line at myline
]



Bad Count:


Fetcher[
apply to symlist(KO,MCD,BKC)
set{ct,close 1 day ago}
/*set{myline,58.5}*/
set{myline,ct - 1}
set{mycrossVar,count(MA(5) crossed above myline,100)}
add column mycrossVar
and draw MA(5)
and draw price line at myline
]



nikoschopen
2,824 posts
msg #58612
Ignore nikoschopen
modified
12/29/2007 4:46:08 PM

The bottom line should be read "and draw myline on plot close"

Fetcher[
apply to symlist(KO,MCD,BKC)
set{ct,close 1 day ago}
/*set{myline,58.5}*/
set{myline,ct - 1}
set{mycrossVar,count(MA(5) crossed above myline,100)}
add column mycrossVar
and draw MA(5)
and draw myline on plot close
]



StockFetcher Forums · General Discussion · Problem with counting close<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2016 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus