PureBytes Links
Trading Reference Links
|
Hi and THANKS !
But I still need to solve the type mismatch - it can't be that hard !!
Anyone....? Anyone....?
Geoff
--- In amibroker@xxxxxxxxxxxxxxx, "pacific5_au <pacific5_au@xxxx>"
<pacific5_au@xxxx> wrote:
> Graham
>
> Guppy CBL AFL (not sure who posted it originally) :
>
> HighDays =13;
> A1=IIf(Cum(C<0),1,0);
> Aa=H<Ref(HHV(H,Highdays),-1);
> bb=Cum(Aa==1);
> dd=IIf(bb==Ref(bb,-1),bb-bb +bb,0);
> ee=IIf(BarsSince(dd==0)>1,ValueWhen(bb,L,0),0);
> kk=IIf(ee==0,Ref(ValueWhen(ee,L,1),ee),0);
>
> zz=IIf(High < HHV(High, HighDays),kk==1,IIf(Ref(L,-2) < Ref(L,-1)
AND
> Ref(L,-2) < L AND Ref(L,-1) < L, Ref(L,-2), IIf((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), Ref(L,-3), IIf((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), Ref(L,-4), IIf((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), Ref(L,-5),0)))));
>
> Aaa=zz==0 + kk==0;
> bba=Cum(1);
> dda=IIf(bba=Ref(bba,-1),bba-bba +bba,0);
> eea=IIf(BarsSince(aaA==0)==1,aaa,0);
> ffa=IIf(eea=0 ,Cum(eea==1) AND BarsSince(eea==1)==1,Cum(eea>1));
> kka=IIf(eea>Ref(eea,-1),Ref(ValueWhen(eea,eea,1),eea),zz);
> ssa=IIf(Aaa,ValueWhen(kkA>0,kka,1),ValueWhen(zz==0,L,1));
> Plot(HHV(ssa,2),"",2,4); // change color as necessary
> Plot(C,"",2,64); // change color as necessary
>
>
> Buy = C > HHV(ssa,2);
>
> Sell = C < HHV(ssa,2);
>
> Buy = ExRem(Buy,Sell);
> Sell = ExRem(Sell,Buy);
>
>
>
> PlotShapes( shapeUpArrow * Buy, colorBrightGreen );
>
> PlotShapes( shapeDownArrow * Sell, colorRed );
>
>
> regards
>
>
> pacific
>
>
>
>
>
> -------------------------------------------------------
> --- In amibroker@xxxxxxxxxxxxxxx, "grmulhall <gmulhall@xxxx>"
> <gmulhall@xxxx> wrote:
> > Hi,
> >
> > In coding Guppy's count back lines (which I'll post in the AFL
> > library when complete) I get a 'Type Mismatch' error. Presumably
> the
> > datatype for the graph I'm creating doesn't match Ami's Low array
> > type.
> >
> > The script is below if anyone can assist.
> >
> > Thanks,
> >
> > Geoff
> >
> > /* Guppy Count Back Lines */
> > /* Geoff Mulhall 12-02-2003 */
> >
> > EnableScript("Vbscript");
> >
> > <%
> >
> > LowArray = AFL("low")
> >
> > CurrentLow = LowArray(UBound(LowArray))
> >
> > For I = UBound(LowArray) to LBound(LowArray) Step -1
> > J = I - 1
> > Hits = 0
> > While Hits < 3 AND J > 0
> > If LowArray (J) < CurrentLow then
> > Hits = Hits + 1
> > CurrentLow = LowArray (J) ' Type
Mismatch
> > End If
> > J = J - 1
> > Wend
> > If Hits = 3 Then
> > StopArray(I) = CurrentLow
> > End If
> > Next
> >
> > AFL.Var("CBLStop") = StopArray
> >
> > %>
> >
> > GraphXSpace = 5;
> >
> > /* Candlestick Chart */
> >
> > Plot(Close," ",1,64);
> >
> > Plot(CBLStop,"Count Back Line", colorBlue,styleLine);
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|