StockFetcher Forums · General Discussion · 5 day median<< 1 2 3 >>Post Follow-up
ronun
27 posts
msg #79159
Ignore ronun
9/14/2009 3:13:43 AM

Trying to calculate the 5 day median of the high + low.
This doesn't work:

set {range, high + low}
set {range1, high 1 day ago + low 1 day ago}
set {range2, high 2 days ago + low 2 days ago}
set {range3, high 3 days ago + low 3 days ago}
set {range4, high 4 days ago + low 4 days ago}
set {total, range + range1 + range2 + range3 + range4}
set {floatingaxis, total / 10}

I'm trying to implement the equations for the value charts described in the book "Dynamic Trading Indicators."
I've struggled with this problem for quite a while so any help is appreciated.

chetron
2,817 posts
msg #79162
Ignore chetron
9/14/2009 6:50:02 AM

CLICKABLE...

Fetcher[
set {range, high + low}
set {range1, high 1 day ago + low 1 day ago}
set {range2, high 2 days ago + low 2 days ago}
set {range3, high 3 days ago + low 3 days ago}
set {range4, high 4 days ago + low 4 days ago}
set {total, range + range1 + range2 + range3 + range4}
set {floatingaxis, total / 10}

]



chetron
2,817 posts
msg #79163
Ignore chetron
modified
9/14/2009 6:51:42 AM

MAYBE....

Fetcher[

SET{VAR1,WEEKLY HIGH + WEEKLY LOW}
SET{VAR2,VAR1 / 2}

DRAW VAR2 ON PLOT PRICE


]



Cacher
121 posts
msg #79195
Ignore Cacher
modified
9/14/2009 2:27:01 PM

I am sure there is an easier way ... but this works ...

Fetcher[
set{HL,high + low}
set{HL1,high 1 day ago + low 1 day ago}
set{HL2,high 2 day ago + low 2 day ago}
set{HL3,high 3 day ago + low 3 day ago}
set{HL4,high 4 day ago + low 4 day ago}

set {md, HL/2}
set {md1, HL1/2}
set {md2, HL2/2}
set {md3, HL3/2}
set {md4, HL4/2}

set {A, md + md1}
set {B,md2 + md3}
set {C,B + md4}
set {D,C + A}
set{Rtotal, D/5}

price is between 9.7 and 10.00
and average volume(30) is greater then 150000
and DRAW Rtotal ON PLOT PRICE

]



... now its time to clean it up and condense some of the code !

chetron
2,817 posts
msg #79242
Ignore chetron
modified
9/14/2009 7:00:08 PM

HOW ABOUT..............
OOOPS...........

Fetcher[


SET{VAR1,HIGH + LOW}
SET{VAR2,SUM(VAR1,5)}
SET{VAR3,VAR2 / 10}
DRAW VAR3 ON PLOT PRICE


CLOSE ABOVE .1
]



Cacher
121 posts
msg #79251
Ignore Cacher
9/14/2009 9:25:32 PM

Hey Chetron, Nicely done !!

chetron
2,817 posts
msg #79253
Ignore chetron
9/14/2009 9:38:42 PM

THANX, I KEEP FORGETTING ABOUT THE SUM FUNCTION, I SHOULD USE IT MORE OFTEN.



ronun
27 posts
msg #79349
Ignore ronun
9/16/2009 2:23:29 AM

Chetron and Cacher - Thank you both for your help. I was able to finish programming the indicators.
I had struggled with the "SUM" function withoutsuccess. I have a tough time debugging Fetcher filters. It seems to require a trial and error approach. I expect it will become easier with experience.

Cacher
121 posts
msg #79357
Ignore Cacher
9/16/2009 8:39:42 AM

ronun ... Sounds like you are onto a good filter. Glad I could help. Chetron turned some lights on for me too with that sweet sum function .... that was really nicely done. Coding is always alot of trial and error .... but its fun.... even the stockmarket is alot of trial and error.... and even more fun ;-)

Kevin_in_GA
4,599 posts
msg #79359
Ignore Kevin_in_GA
9/16/2009 8:50:22 AM

This is not a filter - it is an indicator.

How does one use this? What are the signals for entering into a trade based on this, or on this plus some other indicator in combination?

StockFetcher Forums · General Discussion · 5 day median<< 1 2 3 >>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.