StockFetcher Forums · General Discussion · Need Help with DeMarker Indicator<< >>Post Follow-up
Rick
5 posts
msg #35544
Ignore Rick
4/7/2005 10:21:15 PM

I've been trying to do a filter to emulate the DeMarker Indicator but haven't figured out how to use if/then logic in SF. Any help in adapting the following set of rules to a SF filter would be appreciated.

---

The value of the DeMarker for the "i" interval is calculated as follows:

The DeMax(i) is calculated:
If high(i) > high(i-1) , then DeMax(i) = high(i)-high(i-1),
otherwise DeMax(i) = 0

The DeMin(i) is calculated:
If low(i) < low(i-1), then DeMin(i) = low(i-1)-low(i),
otherwise DeMin(i) = 0

The value of the DeMarker is calculated as:
DMark(i) = SMA(DeMax, N)/(SMA(DeMax, N)+SMA(DeMin, N))

Where:
SMA = Simple Moving Average;
N = the number of periods used in the calculation.

---



stockfetcher
979 posts
msg #35546
4/8/2005 6:38:01 AM

You can use the max function.

In the case of DeMax(i):

If high(i) > high(i-1) , then DeMax(i) = high(i)-high(i-1),
otherwise DeMax(i) = 0

Use:

Fetcher[
set{zero, high - high }
set{demax1,high - high 1 day ago}
set{demax, max(demax1,zero) }
show stocks where close between 20 and 30
and add column demax
and add column high
and add column high 1 day ago {h1dayago}
]



For Demin(i):

If low(i) < low(i-1), then DeMin(i) = low(i-1)-low(i),
otherwise DeMin(i) = 0

Use:

Fetcher[
set{zero, high - high }
set{demin1, low 1 day ago - low}
set{demin, max(demin1, zero) }
show stocks where close between 20 and 30
and add column demin
and add column low
and add column low 1 day ago {l1dayago}
]



So for DeMarker with N=10 you have:

Fetcher[
set{zero, high - high }
set{demax1,high - high 1 day ago}
set{demax, max(demax1,zero) }
set{demin1, low 1 day ago - low}
set{demin, max(demin1, zero) }
set{denom, CMA(demax,10) + CMA(demin,10)}
set{DMARK, CMA(demax,10) / denom }
show stocks where close between 10 and 20
and draw DMARK
]



Hope this helps,
Steve
StockFetcher.com Support




Rick
5 posts
msg #35550
Ignore Rick
4/8/2005 4:45:41 PM

Thanks for suggestions, it does help. The resulting DMARK chart is somewhat different from the output from Prophet.Net (which is the result I'm looking to achieve, so I will tweak the parameters a bit and see if I can make the two match.

I am trying to draw two horizontal lines on the DMARK chart, one at 30 and one at 70. As far as I can tell from the manual, I should use something like:

and draw DMARK
and draw DMARK line at 30
and draw DMARK line at 70

...but neither line shows. What am I doing wrong?

TIA



Rick
5 posts
msg #35552
Ignore Rick
4/8/2005 8:11:34 PM

I'm having some trouble getting accurate results with the DeMarker filter.
I am using the filter shown below, which is the one Steve suggested (but changed 10 days to 7 days).

set{zero, high - high }
set{demax1, high - high 1 day ago}
set{demax, max(demax1,zero) }
set{demin1, low 1 day ago - low}
set{demin, max(demin1, zero) }
set{denom, CMA(demax,7) + CMA(demin,7)}
set{DEMARK, CMA(demax,7) / denom}
draw DEMARK
show stocks where DEMARK is between .35 and .40
and price is between .5 and 10 and
and average volume greater than 10000

When I ask for SF to show stocks where DEMARK is between .35 and .40 maybe two-thirds of the results are in the desire range, but the othe third are not...for example, on today's screen, some of the out of range results I get are:

FAX .70
IMNR .15
AVNX .60

Am I doing something wrong or is this is glitch of some kind in SF?



Rick
5 posts
msg #35555
Ignore Rick
4/9/2005 7:08:36 AM

This is an addendum to my previous message asking about why some of the Demark indicators are out of range. I've included an Add Column to show the DEMARK values, and I have confirmed that all of the values for flagged stocks *are* in the desired range. For example, show stocks where DEMARK is between .35 and .45 produces valid results. But the Demark line in some of the charts are wrong. For example, FDRY is showing up on the list as having a demark value of .45 but on the graphical chart, the line is showing as .18.

This issue seems to affect 25-33% of the charts; while the other 66-75% match the numeric value shown for the corresponding stock.



StockFetcher Forums · General Discussion · Need Help with DeMarker Indicator<< >>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.