[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] Float Analysis VB Project



PureBytes Links

Trading Reference Links

Thank you Tomasz ... your technical wizardry has come through again ;)

Of course my grammar has much to be desired ...

Peter Gialames

-----Original Message-----
From: Tomasz Janeczko [mailto:amibroker@x...]
Sent: Thursday, October 04, 2001 3:29 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Float Analysis VB Project


Hi Peter,

You mispelled the line:
Graph1sytle = Graph2sytle = 1;

change it to:
Graph1style = Graph2style = 1;


Best regards,
Tomasz Janeczko
===============
AmiBroker - the comprehensive share manager.
http://www.amibroker.com


----- Original Message -----
From: "Peter Gialames" <investor@xxxx>
To: "Amibroker" <amibroker@xxxxxxxxxxxxxxx>
Sent: Thursday, October 04, 2001 6:46 PM
Subject: [amibroker] Float Analysis VB Project


> Hello Tomasz,
>
> I have a couple of questions regarding my VB test project. Attached is a
> jpeg of the screen. The top is the AFL code that has been posted on this
> list. The bottom graph is using a VB ActiveX function. Why are there
> vertical lines for the low channel?
>
> Here is what I have in AFL:
>
> MaxGraph = 9;
>
> EnableScript("jscript");
>
> // this is to show only one entry per stock
>
> ticker = Name();
> <%
> CInfo = AFL.CreateStaticObject("QuotesPlus.CompanyInfo");
> CInfo.Symbol = AFL("ticker");
>
> // try-catch block handles the situation when
> // QuotesPlus object returns strange values
>
> try
> {
> AFL("Float") = Number( CInfo.Float() )*1000000;
> }
> catch( e )
> {
> AFL("Float") = 0;
> }
>
> %>
>
> x=Cum(1);
> dback=0;
>
> myobject=CreateObject("AmiVBExample1.Class1");
>
> Dayone=myobject.begday(Volume,Float,dback);
> fHigh=myobject.floatvalue(High,1,Dayone,dback);
> fLow=myobject.floatvalue(Low,0,Dayone,dback);
>
> Graph1=IIf(x>(Dayone) and x<=(x-dback),fHigh,-1e10);
> Graph2=IIf(x>(Dayone) and x<=(x-dback),fLow,-1e10);
> Graph1sytle = Graph2sytle = 1;
>
> Graph0=Close;
> Graph0Style=64;
> Graph0Color=2;
>
> And here is what the code in VB (I just added to the VB project that came
> along with the beta):
>
> Public Function begDay(volArray() As Variant, Float As Variant, Optional
> daysBack As Variant = 0) As Integer
>
> Dim i As Integer
> Dim Sum As Double
>
> i = UBound(volArray) - daysBack
> Sum = 0
>
> Do While Sum < Float
>
> Sum = Sum + volArray(i)
>
> i = i - 1
>
> Loop
>
> begDay = i + 1
>
> End Function
>
> Public Function floatValue(myArray() As Variant, HiLo As Variant, begDay
As
> Variant, Optional daysBack As Variant = 0) As Variant
>
> Dim i As Integer
> Dim Value As Double
>
> i = UBound(myArray) - daysBack
>
> If HiLo = 1 Then 'Find High
>
> Value = 0
> Do While i >= begDay
>
> If myArray(i) > Value Then
> Value = myArray(i)
> End If
>
> i = i - 1
>
> Loop
>
> Else
>
> Value = 10000
> Do While i >= begDay
>
> If myArray(i) < Value Then
> Value = myArray(i)
> End If
>
> i = i - 1
>
> Loop
>
> End If
>
> floatValue = Value
>
> End Function
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>





Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/