JRSnell |
Gold User, Member, Platinum User, TeleChart
|
Registered User |
|
|
|
|
Unsure |
|
Thursday, October 7, 2004 |
Wednesday, April 2, 2014 5:54:13 AM |
6 [0.00% of all post / 0.00 posts per day] |
|
Bruce,
Thanks. You looked at the original formula (the one in EL that I posted)... Does the manner you suggest EXACTLY duplicate that formula?
Thanks,
Jeff
|
Hi Bruce,
You say it would be pretty simple in StockFinder? I looked at the product... looks pretty interesting.
Do you think it would still be easy enough to learn the language AND figure out how to get my original formula programmed?
Like I mentioned before... I know TS EasyLanguage fairly well... but beyond that, nothing about VB etc.
Thanks,
Jeff
|
Bruce,
That's a bummer. I've been a user for nearly 20 years but I've always had to keep another platform around to be able to use this formula. I was hoping to finally get it over to TC2000 to simplify life.
If you can think of any way to get it done... or if anyone else out there can... I would be ecstatic.
Sir Grail
|
Got it... it computes, but is a bit more erratic than what I see in TS. Here's the whole thing with my feeble explanations....
Num = C-_Lst(L,DStLen);
Denom = _Hst (H,DstLen) - _Lst (L,DstLen);
These two statements set up the numerator and denominator of the Stochastic. The Num contains the "_Lst" function which is just the "lowest" (x,y)... so, lowest low of last 10 bars. Ditto reverse for the Denom "_hst" function.
Ratio = IFF (Denom>0, (Num/Denom)*100,Ratio[1]);
This "IFF" is an "if-then" thing: If Denom>0, then calculate the regular stochastic, otherwise use yesterday's.
PctK = IFF (CurrentBar=1,Ratio, PctK[1]+(.5*(Ratio-PctK[1])));
Another "IFF": If you're evaluating the first bar, then use the ratio... otherwise use yesterday's PctK and add half of today's ratio minus yesterday's PctK.
And then we do the whole thing over again for PctK, which gives me the "double" stochastic...
DNum = PctK - _Lst (PctK,DstLen);
DDenom = _Hst (PctK,DstLen) - _Lst (PctK, DStLen);
DRatio = IFF (DDenom>0, (DNum/DDenom) * 100, DRatio[1]);
DPctK=IFF (CurrentBar=1, DRatio, DPctK[1]+(.5*(DRatio - DPctK[1])));
and DPctK is what is plotted.
It seems like it might be doable in TC2000... but I am really getting hung up on these "IFF" things and how to relate this to how TC2000 works.
Thanks again for ANY help,
Jeff
|
Bruce,
Thanks... this just may do it. I guess somewhere I didn't see that the MIN MAX function had other options. Still a bit of a noobie I guess.
One question though... the STOC10 Worden calc... Is this the same as the calc that I had in my post?
((C-MINL10)/(MAXH10-MINL10))*100
Jeff (aka Sir Grail)
|
I'm working on a custom indicator for TC200 that I've used for years under TradeStation. I'm pretty familiar with Easy Language, but I'm having trouble getting it done for TC2000...
Basically, it starts with a typical stochastic calculation... I'm using 10 periods... I've tentatively written this for %K:
((C-MINL10)/(MAXH10-MINL10))*100
Which is a pretty generic stochastics calculation... as far as I can tell, right?
From here, the Easy Language steps to make it the double stochastic are to find the lowest %K for the last 10 periods and the highest %k for the last 10 periods to construct another formula. Is there a way to discover the highest and lowest %K's from the initial formula to use in this final formula? It seems that TC2000 can find it with High,Low,Close, etc (i.e. MINL10)... how is it done for other values?
|
|