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

RE: [amibroker] problem with formula/ or scan test



PureBytes Links

Trading Reference Links

Jayson,
 
No, that is not correct....
 
example: load into AA , select current ticker ( QQQ ) , n last quotation and
n=1
click explore....
 
X=H-(H-L)*.25;
Y=25.21-(25.21-24.71)*.25;//I inserted the high and low of the QQQ'S for
2/24/03.
Filter=1;
AddColumn(X,"X");
AddColumn(H,"H");
AddColumn(L,"L");
AddColumn(Y,"y");
 
>From the Users Guide.
Parentheses can be used to control the operation precedence (the order in
which the operators are calculated). AmiBroker always does operations within
the innermost parentheses first. When parentheses are not used, the
precedence is as follows (higher precedence listed first): 
NoSymbolMeaning
1^Exponentiation
2-Negation - Unary minus
3*Multiplication 
4/Division 
5+Addition 
6-Subtraction
7<Less than 
8>Greater than
9<= Less than or equal to
10>=Greater than or equal to
11==Equal to
12!=Not equal to
13&Bit-wise "And" (AFL 2.1+)
14|Bit-wise "Or" (AFL 2.1+)
15NOTLogical "Not" 
16ANDLogical "And" 
17ORLogical "Or"
18=Variable assignment operator
 
 Anthony
 
-------Original Message-------
 
From: amibroker@xxxxxxxxxxxxxxx
Date: Tuesday, February 25, 2003 10:49:41
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] problem with formula/ or scan test
 
 
 
 
Jayson, 
 
Following on your example...Please check your equation...I am missing
something. 
 
Filter = O>H-(H-L)*.25AND C>H-(H-L)*.25 AND 
 
 
Open - 24.70 
high   -25.34 
low    -24.68  
 
Anthony,
 
I made my calculations late last night (and they were wrong) but I "think"
it would be calculated like this......
 
open=24.70
h-(h-l)=  (25.34-(25.34-24.68)= 24.68    
24.68*.25=     6.17
 
so... 24.70>6.17       
 
wouldn't you need another set of parenthesis....... (h-(h-l)*.25)  to get
your answer ??
 
jayson 
 
( open ) 24.70 > (high ) 25.34-((high)25.34 - (Low) 24.68) * .25 = 
 
24.70 > 25.34 - (.66 ) * ..25 = 
 
24.70 > 25.34 - ( .66 * .25 ) = 
 
24.70 > 25.34 - ( ..1650 ) = 
 
24.70 > 25.34 - (.17 ) = 
 
24.70 > 25.17 
 
Anthony 
-------Original Message------- 
 
From: amibroker@xxxxxxxxxxxxxxx 
Date: Tuesday, February 25, 2003 00:21:29 
To: amibroker@xxxxxxxxxxxxxxx 
Subject: RE: [amibroker] problem with formula/ or scan test 
 
I think there are several problems. Your filter for example........ 
 
Filter = O>H-(H-L)*.25AND C>H-(H-L)*.25 AND 
 
In English you have ....... 
 
Open is greater than high minus the sum of H-L times .25  AND bla, bla 
 
lets use today's QQQ as an example..... 
 
Open - 24.70 
high   -25.34 
low    -24.68 
 
so your filter would return   
 
27.70 {the open price} minus .68  {the sum of H_L} =27.02 
27.02 Times .25= 6.755 
 
or 
 
24.70>6.755   In this case QQQ fails the filter before it even looks at the
2nd part after the AND statement....... 
 
 
In English what are you trying to do?? 
 
Jayson 
 
Jayson 
-----Original Message----- 
From: goldwing01 <goldwing01@xxxxxxx> [mailto:GOLDWING01@xxxxxxx] 
Sent: Monday, February 24, 2003 9:05 PM 
To: amibroker@xxxxxxxxxxxxxxx 
Subject: [amibroker] problem with formula/ or scan test 
 
 
I am using this formula with scan test for now,but question is why is 
this formula only coming back with penny stocks. 
 
Plot( Close, "Price", colorBlue, styleCandle ); 
 
Buy = Cross(Close,O>H-(H-L)*.25 AND C>H-(H-L)*.25 AND 
L<Ref(LLV(L,10),-1)); 
BuyPrice = H +.125; 
BuyStop = H+1.125; 
Filter = O>H-(H-L)*.25AND C>H-(H-L)*.25 AND 
L<Ref(LLV(L,10),-1); 
 
 
 
 
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 the Yahoo! Terms of Service. 
 
Yahoo! Groups Sponsor 
ADVERTISEMENT 
 
 
 
 
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 the Yahoo! Terms of Service. 
 
 
 
 
 
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
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 the Yahoo! Terms of Service. 
 
Yahoo! Groups Sponsor
ADVERTISEMENT
 
 
 
 
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
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 the Yahoo! Terms of Service. 
 
 

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
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/