StockFetcher Forums · General Discussion · SF ... please explain this ...<< >>Post Follow-up
alf44
2,025 posts
msg #117154
Ignore alf44
modified
12/2/2013 2:29:18 PM

.

Below is a small part of numerous scans that I use.

The purpose is to show in a column ... "how many days the MA(10) has been either ABOVE or BELOW the EMA(30)" !

Lately, I've started to notice that every now and then certain symbols appear where this number is just incorrect ... PCLN being one !

---

Run this ... observe the column info and you will see -1 appear for both PCLN and MA (MA being MasterCard) ...

That would seem to indicate that the MA(10) has just crossed BELOW the EMA(30) in the last day ...

NOW ...pull up the chart ... observe the position of the two MAs (MAs being Moving Averages) ...

Clearly not accurate !!!

NOW start clicking backward ... a day, a week, a month ... observe column and chart ... the -1 never changes in the column info and the MAs on the chart clearly show the error !

-----

Fetcher[

/* 1.) Consecutive days MA(10) either Above(+) or Below(-) the EMA(30) --> ("10^30") */

set{daysMA10AboveEMA30, days( MA(10) above EMA(30),100)}
set{daysMA10BelowEMA30, days(MA(10) below EMA(30),100)}

set{daysMA10xEMA30, daysMA10BelowEMA30 - daysMA10AboveEMA30}


symlist(PCLN,MA)

add column daysMA10xEMA30 {10^30}

draw MA(10)
draw EMA(30)
]



-----

Thoughts ?

.

stockfetcher
980 posts
msg #117155
12/2/2013 2:42:40 PM

Hi,

If the condition in the DAYS function is not matched then the days function will return -1. In your example the the ma(10) is not below ema(30) within the 100 day period (even offsetting by a month).

If you run the following example:

Fetcher[
/* 1.) Consecutive days MA(10) either Above(+) or Below(-) the EMA(30) --> (10^30) */
set{daysMA10AboveEMA30, days( MA(10) above EMA(30),100)}
set{daysMA10BelowEMA30, days(MA(10) below EMA(30),100)}
set{daysMA10xEMA30, daysMA10BelowEMA30 - daysMA10AboveEMA30}
symlist(PCLN,MA)
add column daysMA10xEMA30 {10^30}
add column daysMA10AboveEMA30
add column daysMA10BelowEMA30
draw MA(10)
draw EMA(30)
]



Then step back 3 months you should see the variables start to show up.



And with a 3 month date offfset:


Regards,

StockFetcher.com


alf44
2,025 posts
msg #117156
Ignore alf44
12/2/2013 2:52:50 PM

.

... so it is an issue with the maximum 100 day lookback limitation ... correct ?

I kinda suspected that must be it !

.

stockfetcher
980 posts
msg #117157
12/2/2013 2:56:15 PM

Hi,

Yes, that is correct. Given the maximum for DAYS is only 100, the look back period ends before the condition you are looking for is met.

And before Kevin chimes in, yes we are still evaluating what it would take to increase some of the limitations as well as fully document the periods on various indicators. :)

Thanks,
StockFetcher


alf44
2,025 posts
msg #117158
Ignore alf44
modified
12/2/2013 3:00:11 PM

.

... so that column info for PCLN, MA (for example) will continue to read -1 "until" the 10 crosses BELOW the 30 !

Which seemingly ... will never again happen ! LOL

.

StockFetcher Forums · General Discussion · SF ... please explain this ...<< >>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.