PureBytes Links
Trading Reference Links
|
Nirvana, Unless I missunderstand what you have written (which would
be easy for me),I don't think it would work. There are still 13 lines
of code in the graph developement section. The number of lines must
also change with the periods. Thanks, Terry
--- In amibroker@xxxx, "nirvana1x" <nirvanaiam@xxxx> wrote:
>
> I've tested this further and it seems o.k.
>
> in the indicator builder place this as the formula to test against
> the optimized formula to see if it does what you want. change the z
> value which is the periods length to compare the time lengths
with
> the optimized system.
>
> z=3;
>
> lowslope=((z * (Sum( Cum(1) * Low, z))) - (Sum( Cum(1), z) * ( Sum
> (Low, z))))/
> ((z * Sum(( Cum(1)^ 2), z)) - ( Sum(Cum(1),z)^2 ));
>
>
> Graph0=Min(Low,
> Min( Ref(Low,-1) + 1 * (lowslope ),
> Min( Ref(Low,-2) + 2 * (lowslope ),
> Min( Ref(Low,-3) + 3 * (lowslope ),
> Min( Ref(Low,-4) + 4 * (lowslope ),
> Min( Ref(Low,-5) + 5 * (lowslope ),
> Min( Ref(Low,-6) + 6 * (lowslope ),
> Min( Ref(Low,-7) + 7 * (lowslope ),
> Min( Ref(Low,-8) + 8 * (lowslope ),
> Min( Ref(Low,-9) + 9 * (lowslope ),
> Min( Ref(Low,-10) + 10 * (lowslope ),
> Min( Ref(Low,-11) + 11 * (lowslope ),
> Min( Ref(Low,-12) + 12 * (lowslope ),
> Ref(Low,-13) + 13 * (lowslope ))))))))))))));
>
>
> now replace the complete z variable code lines with this,
>
>
> z=IIf(c>0,1,0) +IIf(c>0,1,0)+IIf(c>0,1,0); (e.t.c.)
>
>
> ( this is only to be used as a test for comparing against the
> original formula) as close is always > than 0 .
> this would be a 3 period length, ( to increase the period value
> add +IIf(c>0,1,0) to increase the period by 1 ( for every true
it
> adds an extra 1 to the periods time.
>
>
>
> z=IIf(L<Ref(L,-1),1,0) +IIf(L<Ref(L,-2),1,0)+IIf(L<Ref(L,-3),1,0)
+IIf
> (L<Ref(L,-4),1,0)+IIf(L<Ref(L,-5),1,0)+IIf(L<Ref(L,-6),1,0)+IIf
(L<Ref
> (L,-7),1,0)+IIf(L<Ref(L,-7),1,0)+IIf(L<Ref(L,-8),1,0)+IIf(L<Ref(L,-
> 9),1,0)+IIf(L<Ref(L,-10),1,0)+IIf(L<Ref(L,-11),1,0)+IIf(L<Ref(L,-
> 12),1,0)+IIf(L<Ref(L,-13),1,0);
>
> Aa=((z * (Sum( Cum(1) * Low, z))) - (Sum( Cum(1), z) * ( Sum(Low,
> z))))/
> ((z * Sum(( Cum(1)^ 2), z)) - ( Sum(Cum(1),z)^2 ));
>
> Lowslope=Aa;
>
>
> Graph0=Min(Low,
> Min( Ref(Low,-1) + 1 * (lowslope ),
> Min( Ref(Low,-2) + 2 * (lowslope ),
> Min( Ref(Low,-3) + 3 * (lowslope ),
> Min( Ref(Low,-4) + 4 * (lowslope ),
> Min( Ref(Low,-5) + 5 * (lowslope ),
> Min( Ref(Low,-6) + 6 * (lowslope ),
> Min( Ref(Low,-7) + 7 * (lowslope ),
> Min( Ref(Low,-8) + 8 * (lowslope ),
> Min( Ref(Low,-9) + 9 * (lowslope ),
> Min( Ref(Low,-10) + 10 * (lowslope ),
> Min( Ref(Low,-11) + 11 * (lowslope ),
> Min( Ref(Low,-12) + 12 * (lowslope ),
> Ref(Low,-13) + 13 * (lowslope ))))))))))))));
>
> cheers: nirvana.
>
>
>
>
>
|