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

Re: [amibroker] function needed



PureBytes Links

Trading Reference Links

Dear Tomasz and others,

Now i can calculate the min and max of this 6 study's.
How can i calculate the thirst one that is <0 and second that is <0 and at
last thirst one, that is >0.

Example: I want:
D1 = 15% 1st_resistance = 03%
D2 = 24% (max) 2nd_resistance= 09%
D3 = 09% 3th_resistance = 15%
D4 = 03% 4th_resistance = 24%
D5 = -27% (min) 1st_support = -20%
D6 = -20% 2nd_support = -27%

I only need the first and second support level and the first and second
resistance level.

Please help me

Thank you very much

Thomas


----- Original Message -----
From: "Tomasz Janeczko" <amibroker@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, November 27, 2001 11:28 AM
Subject: Re: [amibroker] function needed


> Dear Thomas,
>
> I can see no problem here,
> you can calculate distances to each study easily:
>
> L1 = Study ("SU"); L2 = Study ("RE"); L3 = Study ("DN");L4 = Study ("UP");
> L5 = Study ("RI"); L6 = Study ("ST");
>
> /* calculate distances in percent */
> D1 = 100 * ABS( L1 - Close )/Close;
> D2 = 100 * ABS( L2 - Close )/Close;
> D3 = 100 * ABS( L3 - Close )/Close;
> D4 = 100 * ABS( L4 - Close )/Close;
> D5 = 100 * ABS( L5 - Close )/Close;
> D6 = 100 * ABS( L6 - Close )/Close;
>
> /* then you can easily calculate a minimum one in
> the way described in my previous e-mail */
>
> D1 = IIf( IsEmpty( D1 ), 1e10, D1 );
> D2 = IIf( IsEmpty( D2 ), 1e10, D2 );
> D3 = IIf( IsEmpty( D3 ), 1e10, D3 );
> D4 = IIf( IsEmpty( D4 ), 1e10, D4 );
> D5 = IIf( IsEmpty( D5 ), 1e10, D5 );
> D6 = IIf( IsEmpty( D6 ), 1e10, D6 );
>
> /* we calculate a minimum now */
> MinDistance = Min(D1,Min(D2,Min(D3,Min(D4,Min(D5,D6)))));
> MinDistance = IIf( MinDistance == 1e10, -1e10, MinDistance );
>
>
> Best regards,
> Tomasz Janeczko
> ===============
> AmiBroker - the comprehensive share manager.
> http://www.amibroker.com
>
> ----- Original Message -----
> From: "Thomas Z." <thomas.zm@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Monday, November 26, 2001 6:40 PM
> Subject: Re: [amibroker] function needed
>
>
> > Hello Tomasz,
> >
> > Thanks for your support.
> > I describe my problem: I draw 2,3,4,5 or 6 study's. Every study become
any
> > ID, but the ID should say nothing about support or resistance.
> > I want to calculate the distance from the close to the next support and
the
> > next resistance and also the 2nd support.
> >
> > I think, it's not so easy, because support and resistance are always
> > changed, if the close breaks the resistance or support.
> >
> > Hope, that you can help me
> >
> > Thomas
> >
> >
> > ----- Original Message -----
> > From: "Tomasz Janeczko" <amibroker@xxxx>
> > To: <amibroker@xxxxxxxxxxxxxxx>
> > Sent: Monday, November 26, 2001 9:22 AM
> > Subject: Re: [amibroker] function needed
> >
> >
> > > Hello,
> > >
> > > I started to answer all your previous e-mails - then I saw that
> > > all of them are answered :-)
> > >
> > > But... now it's the one left without a solution, so I finally can
> > > write something :-)
> > >
> > > Well, you should do the following trick:
> > >
> > >
> > > L1 = Study ("SU"); L2 = Study ("RE"); L3 = Study ("DN");L4 = Study
("UP");
> > > L5 = Study ("RI"); L6 = Study ("ST");
> > >
> > > /* Now we check for empty values (where no trendline is present)
> > > ** and we assign a huge value to the result 10^10
> > > */
> > >
> > > L1 = IIf( IsEmpty( L1 ), 1e10, L1 );
> > > L2 = IIf( IsEmpty( L2 ), 1e10, L2 );
> > > L3 = IIf( IsEmpty( L3 ), 1e10, L3 );
> > > L4 = IIf( IsEmpty( L4 ), 1e10, L4 );
> > > L5 = IIf( IsEmpty( L5 ), 1e10, L5 );
> > > L6 = IIf( IsEmpty( L6 ), 1e10, L6 );
> > >
> > > /* we calculate a minimum now */
> > > x = Min(L1,Min(L2,Min(L3,Min(L4,Min(L5,L6)))));
> > >
> > > /* now we check if minimum is this huge val
> > > ** if so - it means that all L1-L6 were empty
> > > ** so we assign back the empty value -1e10 */
> > >
> > > x = IIf( x == 1e10, -1e10, x );
> > >
> > > Graph0 = x;Graph0Style = 5;
> > > Graph0Color = 10;
> > > Title = WriteVal(Graph0,1.2);
> > >
> > >
> > >
> > > Best regards,
> > > Tomasz Janeczko
> > > ===============
> > > AmiBroker - the comprehensive share manager.
> > > http://www.amibroker.com
> > >
> > >
> > > ----- Original Message -----
> > > From: "Thomas Z." <thomas.zm@xxxx>
> > > To: <amibroker@xxxxxxxxxxxxxxx>
> > > Sent: Monday, November 26, 2001 1:42 AM
> > > Subject: Re: [amibroker] function needed
> > >
> > >
> > > > Hello,
> > > > my last problem, the function shows me only the lowest of the 6
> > arguments,
> > > > if all arguments are there.
> > > > As for my arguments i use trendlines and if one of this 6 lines are
not
> > > > drawn or defined, i see no value.
> > > >
> > > > L1 = Study ("SU"); L2 = Study ("RE"); L3 = Study ("DN");L4 = Study
> > ("UP");
> > > > L5 = Study ("RI"); L6 = Study ("ST");
> > > >
> > > > x = Min(L1,Min(L2,Min(L3,Min(L4,Min(L5,L6)))));
> > > > Graph8 = x;Graph8Style = 5;
> > > > Graph8Color = 10;
> > > > Title = WriteVal(Graph8,1.2);
> > > >
> > > > Is there any way
> > > >
> > > > Thomas
> > > >
> > > > ----- Original Message -----
> > > > From: "Steve Wiser" <slwiserr@xxxx>
> > > > To: <amibroker@xxxxxxxxxxxxxxx>
> > > > Sent: Monday, November 26, 2001 12:59 AM
> > > > Subject: Re: [amibroker] function needed
> > > >
> > > >
> > > > > Thomas
> > > > >
> > > > > How about:
> > > > >
> > > > > Checking out the attached gif.
> > > > >
> > > > > Steve
> > > > >
> > > > > At 12:39 AM 11/26/2001 +0100, you wrote:
> > > > > >Sorry, it's not the function that i need, because i can only use
two
> > > > > >arguments with this function.
> > > > > >Currently i've 6 arguments and want every day the lowest of this
6
> > > > arguments.
> > > > > >
> > > > > >Please help
> > > > > >
> > > > > >Thanks
> > > > > >Thomas
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > 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/
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> > > 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/
> >
> >
> >
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>