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

Re: [amibroker] Where´s the flaw?



PureBytes Links

Trading Reference Links


Hello,
 
Jayson: I really appreciate your posts.  I was just about 
to answer some questions on the mailing list
but...I found almost all of them answered already by you and 
other active members of this group.
Thank you!
 
I am quite busy now working on new data plugins and (finally) 
on new SDK to be released in November.
 
Markus:
1. First of all 
x=llv(low,5) does not constitute boolean condition. It does 
give you  lowest low from 5 recent bars.
You should use
 
x = LLV( Low, 5 ) == Low;
 
or 
 
x = LLVBars( Low, 5 ) == 0;
 
2. Second thing:
"Now, I want to find the high of condition 2 that occured 
right before the low of condition 1. Thus, cum(1) of condition 2 is less than 
that of condition 1."
 
There are other functions for that:

cond1 = LLVBars( Low, 5 ) == 
0;
 
// to get the Highest point since cond1 is true you can 
use:
HighestSince( cond1, High );
 
if you want to get the 5 bar highest since cond1 is 
true
 
ValueWhen( Ref( cond1, -5 ), HighestSince( cond1, High ) 
);
 
You may add your Cum(1)>150 
clause to filter out first 150 bars if you wish
 
3. Last thing:
it is better to describe entire system (not just single-line 
problem) because
it is easier to provide valuable reply 
then. 
Best regards,Tomasz Janeczkoamibroker.com
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
IVA GmbH 
To: <A title=amibroker@xxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx 
Sent: Wednesday, October 30, 2002 12:19 
AM
Subject: Re: [amibroker] Where´sthe 
flaw?

Jayson,
 
appreciate your ongoing "tech 
support"!
 
Well, the code is part of an exploration- 
correct.
 
Your first solution dosn´t work since it suggests 
that only symbols with mroe than 150 days of price data are included, if I 
understand it properly.
 
The second soluation comes close and I also 
thought of it as well. 
 
Question back: is it enough to require that the 
cum value equals 150 or wouldn´t it be correct to require that the cum value 
of condition 1 (here: 150) is larger than the one of 
condition two?
 
Let me give an example:
 
x=llv(low,5)
condition 1=valuewhen(x,cum(1),1);
 
y=hhv(high,5)
condition 2=valuewhen(y,cum(1),1);
 
Now, I want to find the high of condition 2 that 
occured right before the low of condition 1. Thus, cum(1) of condition 2 is 
less than that of condition 1.
 
One more specification is necessary, andthis is 
where my problem kicks in: I have to find the first instance where y applies 
AND where its cum value is smaller than that of condition 1.
 
Are you lost?
 
Markus
 
 
 
 
----- Original Message ----- 
<BLOCKQUOTE 
>
<DIV 
>From: 
<A title=jcasavant@xxxx 
href="">Jayson 
To: <A title=amibroker@xxxxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Tuesday, October 29, 2002 6:34 
PM
Subject: RE: [amibroker] Where´s the 
flaw?
<FONT 
face=Arial size=2><FONT face=Arial 
size=2><FONT face=Arial 
size=2>
<SPAN 
class=010122817-29102002>Marcus,
<SPAN 
class=010122817-29102002>this is an exploration?? 
try.......
<SPAN 
class=010122817-29102002> 
<SPAN 
class=010122817-29102002>filter=cum(1)>150;
<SPAN 
class=010122817-29102002>valuewhen(condition2,low,1)
<SPAN 
class=010122817-29102002> 
or 
alternatively
<SPAN 
class=010122817-29102002> 
<SPAN 
class=010122817-29102002>valuewhen(cum(1)>150 and 
condition2,low,1)
 
Jayson 

<FONT face=Tahoma 
size=2>-----Original Message-----From: <A 
href="">funnybiz@xxxx 
[mailto:funnybiz@xxxx]Sent: Tuesday, October 29, 2002 12:07 
PMTo: <A 
href="">amibroker@xxxxxxxxxxxxxxxSubject: 
[amibroker] Where´s the flaw?
Folks,
 
I´m trying to tell AB that one condition show 
come before another. My criteria of defining "b3fore" is the cum value of 
thope two conditions of which the first one has -let´s say- a cum value 0f 
150.
 
This doens´t work, and I don´t know 
why:
 
<FONT face=Arial 
size=2>Valuewhen(iif(condition2,cum(1),0)<150,low,1)
 
I´m trying to determine the low for the day on 
which condition two is fulfilled which should show a cum value <150 AT 
THE FIRST instance since condition 2 might ocur several times with a cum 
value smaller than 150!
 
Any ideas why it soesn´t wanna 
work????
 
Appreciate it!
 
MarkusPost 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: 
<A 
href="">http://groups.yahoo.com/group/amiquote/messages/)Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service. 
Post AmiQuote-related messages ONLY to: 
amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service. 
Post 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service.