mcwang2012 |
Gold User, Member, Platinum User, TeleChart
|
Registered User |
|
|
|
|
Gender: |
|
Sunday, February 17, 2013 |
Tuesday, August 26, 2014 11:03:17 AM |
67 [0.02% of all post / 0.02 posts per day] |
|
Dear Sir,
IS THERE A PCF WHICH CAN HELP FIND STOCKS IN A RISING CHANNEL FOR A PERIOD OF THE LAST 120 DAYS BASED ON PRICE?
BR,
MCWANG
|
Dear Bruce,
If I can use 330, instead of 450, in the following formula. Is that possible that we can write the formula for VARG?
Br,
----------------------------------------------
QUOTE (Bruce_L)
VARC isn't a particularly big problem.
100 * (ABS(L - L1) + ABS(L1 - L2) + ABS(L2 - L3)) / (ABS(L > L1) * (L - L1) + ABS(L1 > L2) * (L1 - L2) + ABS(L2 > L3) * (L2 - L3))
And you have come very close to what I had for an unexpanded VARA. Once we have VARA, we don't need anything above it. You appear to be missing the outer XAVG(,21) structure and I'm not quite sure if your factors or mine are correct (they don't match).
XAVG(XAVG((6.68*XAVG(MINL450,21)+6.64*XAVG(MINL250,21)+6.58*XAVG(MINL90,21)+3.464*(XAVG(MAXH450,21)+XAVG(MAXH250,21)+XAVG(MAXH90,21)))/36*1.738,21),21)
The problem is the nested 21-period exponential moving averages which go three deep. If the EMAs were different periods, then we could combine them in a way which does not require a manual expansion of the moving averages but that is not the case. This means substituting in the base items being averaged into something like:
(1/2)*(1-a)^3
*(1*2*C0+a
*(2*3*C1+a
*(3*4*C2+a
*...
*((k+1)*(k+2)*Ck+a
*...)))...
Where C0, C1, C2 and Ck are bars ago versions of MAXH450, MAXH250, MAXH90, MINL450, MINL250 and MINL90. And we need to take this expansion out to 100+ bars in order for the approximation to converge on an accurate value.
Cascades of Moving Averages
And the calculation for VARA needs to be included in every comparison used to create VARD for every term. The manual expansion of the 3-period exponential moving average can probably be done using 15-20 terms, but that still means 15-20 copies of bars ago versions of VARA to create VARD.
Then VARF requires getting the highest value for VARD over 60 bars. The technique I've devised for this has only even been expanded out to 32 bars because anything longer is too long and slow to be practical even when we aren't trying to find the high of something as complicated as VARD. Just take a look at the following topic to see how quickly the formulas increase in size.
Min Max PCFs
And then VARG itself ends up being a 3-period exponential moving average as well which needs to incorporate 15-20 bars ago copies of VARD and VARF.
We could do this using something with a full programming language like the RealCode in StockFinder or in TC2000 if the XAVG(), AVG(), MIN() and MAX() functions could accept complex formulas as arguments instead of being limited to only taking one of the indicators built into the PCF Language as arguments, but as things stand, it is not possible to create a PCF for VARG in TC2000.
|
Dear Bruce,
It seems the following formula is not accepted by TC. How should I modify it?
( (C'01/03/2013' * C'01/03/2013' / C-MIN( C'01/03/2013' * C'01/03/2013' / H , 5) )/( MAX( C'01/03/2013' * C'01/03/2013' / C , 5 )-MIN( C'01/03/2013' * C'01/03/2013' / H , 5) ) )*100
Br,
Mike
|
|
Dear Bruce,
It seems the following formula is not accepted by TC. How should I modify it?
( (C'01/03/2013' * C'01/03/2013' / C-MIN( C'01/03/2013' * C'01/03/2013' / H , 5) )/( MAX( C'01/03/2013' * C'01/03/2013' / C , 5 )-MIN( C'01/03/2013' * C'01/03/2013' / H , 5) ) )*100
Br,
Mike
|
Dear Bruce,
What are the main new features of TC12.4beta?
Br,
Mike
|
Dear Bruce,
What should I write for
1. the value of C at a particular day, said 20120103;
2. the value of C at the first bar, among all the available data
3. the value of a variable (said, MAXH17-MINL13.2) at 10 bar ago
Br,
Mike
|
Dear Bruce,
[the definition , BarNumber is an EL function that allows you to determine the number of the bar that is currently being calculated.Starting with the first calculation bar after MaxBarsBack, each bar is assigned a number starting at 1.]
Cs is the value of C of BARSnumber-1 bars ago.
Cr and Lr are variables , defined by
Cr=Cs^2/C
Lr=Cs^2/H
I like to calculate the formula as follows
((Cr-MINLr.5)/(MAXCr.5-MINLr.5))*100
Br,
Mike
|
Dear Bruce,
Is there a similar function in TC2000.14 as Barsnumber in EasyLanguage?
I like to use an indicator, with the formula as
((Cr-MINLr.5)/(MAXCr.5-MINLr.5))*100
while Cr and Lr are defined as follows.
C2:=(C.BARSnumber) * (C.BARSnumber) / C;
CR:=C2/C;
LR:=C2/H;
Br,
Mike
|
Dear Bruce,
I think I found the icon.
Br,
Mike
|
Dear Bruce,
I can not find the icon for exporting chart data. Do you mind sending me a figure showing the icon's position?
Also, any plan or schedule for TC2000.12 to be able to incorporate the arguments of complex functions?
Br,
Mike
|
|