PureBytes Links
Trading Reference Links
|
...or one could save a lot of space thus:
=====================
Count Back Line - Buy
=====================
---8<----------------
pdsLo:=Input("Periods to cover last Low for CBL calculation:",2,252,
13);
H1:=Ref(H,-1);
H2:=Ref(H,-2);
H3:=Ref(H,-3);
H4:=Ref(H,-4);
H5:=Ref(H,-5);
CBLB:=If(L>LLV(L,pdsLo),PREV,
If(H2>H1 AND H1>H,H2,
If(H3>HHV(H,3) AND (H2>H OR H1>H),H3,
If(H4>HHV(H,4) AND (H3>H OR H2>H OR H1>H),H4,
If(H5>HHV(H,5) AND (H4>H OR H3>H OR H2>H
OR H1>H),H5,
PREV)))));
CBLB
---8<----------------
======================
Count Back Line - Sell
======================
---8<-----------------
pdsHi:=Input("Periods to cover last High for CBL calculation:",2,252,
13);
L1:=Ref(L,-1);
L2:=Ref(L,-2);
L3:=Ref(L,-3);
L4:=Ref(L,-4);
L5:=Ref(L,-5);
CBLS:=If(H<HHV(H,pdsHi),PREV,
If(L2<L1 AND L1<L,L2,
If(L3<LLV(L,3) AND (L2<L OR L1<L),L3,
If(L4<LLV(L,4) AND (L3<L OR L2<L OR L1<L),L4,
If(L5<LLV(L,5) AND (L4<L OR L3<L OR L2<L
OR L1<L),L5,
PREV)))));
CBLS
---8<-----------------
jose '-)
--- In equismetastock@xxxxxxxxxxxxxxx, dusant@xxxx wrote:
> I think this is what ur looking for:
>
> CBLhi:
>
> HighDays := Input("Enter # days to cover last HIGH for CBL calc'n:",
> 3, 55, 13);
>
> If(HIGH < HHV(HIGH, HighDays), {then ...} PREV, {previous CBLhi,
> else...} If(Ref(L,-2) < Ref(L,-1) AND Ref(L,-2) < L AND Ref(L,-1) <
> L, {then ...} Ref(L,-2), {2nd day back low, else...} If((Ref(L,-3)<
> Ref(L,-2) AND Ref(L,-3) < Ref(L,-1) AND Ref(L,-3) < L) AND (Ref(L,
-2)
> < L OR Ref(L,-1) < L), {then ... } Ref(L,-3), {3rd day back low,
> else...} If((Ref(L,-4)< Ref(L,-3) AND Ref(L,-4) < Ref(L,-2) AND Ref
> (L,-4) < Ref(L,-1) AND Ref(L,-4) < L) AND (Ref(L,-3)< L OR Ref(L,-2)
> < L OR Ref(L,-1) < L), {then... } Ref(L,-4), {4th day back low,
> else...} If((Ref(L,-5)< Ref(L,-4) AND Ref(L,-5) < Ref(L,-3) AND Ref
> (L,-5) < Ref(L,-2) AND Ref(L,-5) < Ref(L,-1) AND Ref(L,-5) < L) AND
> (Ref(L,-4)< L OR Ref(L,-3) < L OR Ref(L,-2) < L OR Ref(L,-1) < L),
> {then ...} Ref(L,-5), {5th day back low, else...} PREV )))))
>
> {and for the CBL from a LOW }
>
> CBLlo:
>
> LowDays := Input("Enter # days to cover last LOW for CBL calc'n:",
3,
> 55, 13);
>
> If(LOW > LLV(LOW, LowDays), {then ...} PREV, {previous CBLlo,
> else...} If(Ref(H,-2) > Ref(H,-1) AND Ref(H,-2) > H AND Ref(H,-1) >
> H, {then ...} Ref(H,-2), {2nd day back high,else...} If((Ref(H,-3)>
> Ref(H,-2) AND Ref(H,-3) > Ref(H,-1) AND Ref(H,-3) > H) AND (Ref(H,
-2)
> > H OR Ref(H,-1) > H), {then ... } Ref(H,-3), {3rd day back
> high,else...} If((Ref(H,-4)> Ref(H,-3) AND Ref(H,-4) > Ref(H,-2) AND
> Ref(H,-4) > Ref(H,-1) AND Ref(H,-4) > H) AND (Ref(H,-3)> H OR Ref(H,
-
> 2) > H OR Ref(H,-1) > H), {then... } Ref(H,-4), {4th day back
> high,else...} If((Ref(H,-5)> Ref(H,-4) AND Ref(H,-5) > Ref(H,-3) AND
> Ref(H,-5) > Ref(H,-2) AND Ref(H,-5) > Ref(H,-1) AND Ref(H,-5) > H)
> AND (Ref(H,-4)> H OR Ref(H,-3) > H OR Ref(H,-2) > H OR Ref(H,-1) >
> H), {then ...} Ref(H,-5), {5th day back high,else...} PREV )))))
>
> Dusant
> Chief Architect
> http://www.candlestrength.com/
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/BefplB/TM
---------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|