StockFetcher Forums · General Discussion · How to 'not draw' correlation variables?<< >>Post Follow-up
lis
37 posts
msg #142917
Ignore lis
3/26/2018 12:05:33 PM

Fetcher[chart-time is 50 days
chart-type is candlestick
add column separator

set{corrval,corr(^SPX,50,close)}
set{corrpos,count(corrval greater than 0.5,50)}
set{corrneg,count(corrval less than -0.5,50)}
add column corrpos
add column corrneg
add column corr(^SPX,50,close)
draw corr(^SPX,50,close)
draw corr(^SPX,50,close) line at 1
draw corr(^SPX,50,close) line at -1

and corrpos equals 0
and corrneg equals 0
]



draws a 'corrpos' and 'corrneg' as a lower plot. Entering 'do not draw corrpos' and 'do not draw corrneg' causes a problem preventing results from being shown. How do I eliminate that lower plot?

four
5,087 posts
msg #142919
Ignore four
3/26/2018 12:22:20 PM

Using ABCE as the model...
The filter below removes CORRPOS and CORRNEG
Correllation is still showing
See the screen below.



Fetcher[
chart-time is 50 days
chart-type is candlestick
add column separator

set{corrval,corr(^SPX,50,close)}
set{corrpos,count(corrval greater than 0.5,50)}
set{corrneg,count(corrval less than -0.5,50)}
add column corrpos
add column corrneg
add column corr(^SPX,50,close)
draw corr(^SPX,50,close)
draw corr(^SPX,50,close) line at 1
draw corr(^SPX,50,close) line at -1

and corrpos equals 0
and corrneg equals 0

do not draw corrpos
do not draw corrneg
]




lis
37 posts
msg #142920
Ignore lis
3/26/2018 12:40:42 PM

Ah! Thanks four!

Sometimes it matters *where* certain statements occur. I was putting the 'do not draw' statements *before* the 'equals 0' statements. Once I moved them down, as you demonstrated, I got my results.

four
5,087 posts
msg #142921
Ignore four
3/26/2018 1:32:30 PM

welcome

StockFetcher Forums · General Discussion · How to 'not draw' correlation variables?<< >>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.