StockFetcher Forums · General Discussion · Drawing price line using a variable<< >>Post Follow-up
Norm.Sash
26 posts
msg #98456
Ignore Norm.Sash
1/6/2011 1:58:11 AM

the following syntax works to draw a line at the closing price 20 days ago:

and draw price line at close 20 days ago


But if I change the syntax to use a variable instead of a hard coded number for the xx days ago it fails (looks like it draws a line at zero).

set{ var, 20}
and draw price line at close var days ago


Any idea what is wrong with this syntax and how to accomplish drawing a closing price at a date which is variable in the past?

Kevin_in_GA
4,599 posts
msg #98482
Ignore Kevin_in_GA
1/7/2011 2:24:16 PM

SF user-defined variables do not work in this way. Sorry. Good idea though.

mahkoh
1,065 posts
msg #98494
Ignore mahkoh
1/7/2011 6:50:07 PM

Sorry I cannot help you but this post has finally got my pivot filter with lines on the chart working. Thanks a lot!

Fetcher[
symlist (spy)


set{mh,high 22 day high 5 days ago}
set{ml ,low 22 day low 5 days ago}
set{cl ,close 5 days ago}

and draw price line at mr1
and draw price line at mr3
and draw price line at mr2
and draw price line at ms3
and draw price line at ms2
and draw price line at mpp
and draw price line at ms1

set{mp1,cl + mh}
set{mp,mp1 + ml}
set{mpp,mp/3}

set{mr1x,mpp*2}
set{mr1,mr1x - ml}
set{ms1,mr1x - mh}

set{mrange,mh - ml}
set{mr2,mpp + mrange}
set{ms2,mpp - mrange}

set{m2r,mrange*2}
set{mr3,mpp + m2r}
set{ms3,mpp - m2r}

and add column ms3
and add column ms2
and add column ms1
and add column mpp
and add column mr1
and add column mr2
and add column mr3
]







StockFetcher Forums · General Discussion · Drawing price line using a variable<< >>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 2022 - 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


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.