SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Strategies & Market Trends : TA-Quotes Plus -- Ignore unavailable to you. Want to Upgrade?


To: Sean W. Smith who wrote (3003)1/12/1998 9:30:00 PM
From: TechTrader42  Respond to of 11149
 
You wrote: "Because of the usage of cum(1) this indicator will look different depending on whether you load 30 days, 6 months, or 6 years worth of data."

Yes, I've been looking at this tonight, breaking down the Metastock formula and plotting it. The way to get around this in QP would be to assume you're working with a given amount of data -- say, 250 days.

For sum we can use the for loop. This will include cum (which will start at a high number and go back 14 days, I think. You can see what sort of numbers we're working with in cum by plotting cum(1) in a Metastock chart, and then sum(cum(1)*c,14).

As for power, in this formula it's 2, which is the square of the data array.

This formula is a monster, though. I've done quite a few translations so far, and none has been right.

Brooke



To: Sean W. Smith who wrote (3003)1/13/1998 12:48:00 AM
From: TechTrader42  Respond to of 11149
 
Here's a start on a translation of the MSWIN slope formula. This is just an attempt at the numerator of the formula, and it may be complete nonsense. But I'm finding it so difficult that I'll post this much in the hope that someone can help (save me from a slippery slope). As I said, this doesn't include the denominator with the power function yet. This formula assumes that 100 days of data are loaded in Metastock (to get around the problem of the cumulate function). It's probably a misguided attempt, but here it is (help!!!):

//Slope, assuming that 100 days of data is loaded in Metastock
//This is only the numerator of the formula
//Still working on denominator (and numerator, for that matter)
//Here's MSWIN formula:( (14 * (Sum(Cum( 1 ) * C ,14 ) ) ) -
//(Sum(Cum( 1 ) ,14 ) * (Sum( C ,14) ) ) ) /
//( (14 * Sum(Pwr (Cum( 1 ) ,2 ) ,14 ) )
// - Pwr(Sum(Cum( 1 ) ,14 ) ,2 ) )

output="slope.lst";

DaysToLoad=500;

integer i,k;

float j,l,m,n, numerator;

j:=0;

for i=0 to -13 step -1
do
j := j + close(i); //j is sum(c, 14)
next i;


l:=86;

for k=87 to 100 step 1
do
l := l+k;
next k; //k represents sum(cum(1),14)

m :=14*l*close(0); // this is: (14 * (Sum(Cum( 1 ) * C ,14 ) ) )

n :=l*j; //this is: (Sum(Cum( 1 ) ,14 ) * (Sum( C ,14) ) ) )

numerator := m-n;

println symbol , "," ,numerator;

************

I'm not exactly sure what's going on with those summations -- whether one represents 14 times the most recent close times a cumulative total of the days, to compare with the sum of the close for each day over 14 days, again times the cumulative total of the days. I think that's the idea, but I may have it wrong. I may have it hilariously wrong, in fact. Anyway, if anyone cares to step up to the drawing board.....

Brooke