PureBytes Links
Trading Reference Links
|
I believe the Worden code translates as follows: I believe it is probably used as an exploration - but for what I haven't taken the time to try to figure it out. Now if someone could help translate the TS code I posted under Code Translation Help on October 26.
Rick
AVGC31 = Ref(MA(C,3),-1);
x = C <= 5 AND
(( Ref(H,-5) > Ref(HHV(H,20),-6) AND Ref(H,-5)>= 1.5 * Ref(LLV(L,44),-6) AND AVGC31 <= Ref(H,-5) AND
AVGC31 > Ref(LLV(L,44),-6)) OR
( Ref(H,-6) > Ref(HHV(H,19),-7) AND Ref(H,-6) >= 1.5 * Ref(LLV(L,43),-7) AND AVGC31 <= Ref(H,-6) AND AVGC31
> Ref(LLV(L,43),-7)) OR
( Ref(H,-7) > Ref(HHV(H,-18),-8) AND Ref(H,-7) >= 1.5 * Ref(LLV(L,42),-8) AND AVGC31 <= Ref(H,-7) AND AVGC31
> Ref(LLV(L,42),-8)) OR
( Ref(H,-8) > Ref(HHV(H,-17),-9) AND Ref(H,-8) >= 1.5 * Ref(LLV(L,41),-9) AND AVGC31 <= Ref(H,-8) AND AVGC31
> Ref(LLV(L,41),-9)) OR
( Ref(H,-9) > Ref(HHV(H,-16),-10) AND Ref(H,-9) >= 1.5 * Ref(LLV(L,40),-10) AND AVGC31 <= Ref(H,-9) AND
AVGC31 > Ref(LLV(L,40),-10)) OR
( Ref(H,-10) > Ref(HHV(H,-15),-11) AND Ref(H,-10) >= 1.5 * Ref(LLV(L,39),-11) AND AVGC31 <= Ref(H,-10) AND
AVGC31 > Ref(LLV(L,39),-11)) OR
( Ref(H,-11) > Ref(HHV(H,-14),-12) AND Ref(H,-11) >= 1.5 * Ref(LLV(L,38),-12) AND AVGC31 <= Ref(H,-11) AND
AVGC31 > Ref(LLV(L,38),-12)) OR
( Ref(H,-12) > Ref(HHV(H,-13),-13) AND Ref(H,-12) >= 1.5 * Ref(LLV(L,37),-13) AND AVGC31 <= Ref(H,-12) AND
AVGC31 > Ref(LLV(L,37),-13)) OR
( Ref(H,-13) > Ref(HHV(H,-12),-14) AND Ref(H,-13) >= 1.5 * Ref(LLV(L,36),-14) AND AVGC31 <= Ref(H,-13) AND
AVGC31 > Ref(LLV(L,36),-14)) OR
( Ref(H,-14) > Ref(HHV(H,-11),-15) AND Ref(H,-14) >= 1.5 * Ref(LLV(L,35),-15) AND AVGC31 <= Ref(H,-14) AND
AVGC31 > Ref(LLV(L,35),-15)) OR
( Ref(H,-15) > Ref(HHV(H,-10),-16) AND Ref(H,-15) >= 1.5 * Ref(LLV(L,34),-16) AND AVGC31 <= Ref(H,-15) AND
AVGC31 > Ref(LLV(L,34),-16)) OR
( Ref(H,-16) > Ref(HHV(H,-9),-17) AND Ref(H,-16) >= 1.5 * Ref(LLV(L,33),-17) AND AVGC31 <= Ref(H,-16) AND
AVGC31 > Ref(LLV(L,33),-17)) OR
( Ref(H,-17) > Ref(HHV(H,-8),-18) AND Ref(H,-17) >= 1.5 * Ref(LLV(L,32),-18) AND AVGC31 <= Ref(H,-17) AND
AVGC31 > Ref(LLV(L,32),-18)) OR
( Ref(H,-18) > Ref(HHV(H,-7),-19) AND Ref(H,-18) >= 1.5 * Ref(LLV(L,31),-19) AND AVGC31 <= Ref(H,-18) AND
AVGC31 > Ref(LLV(L,31),-19)) OR
( Ref(H,-19) > Ref(HHV(H,-6),-20) AND Ref(H,-19) >= 1.5 * Ref(LLV(L,30),-20) AND AVGC31 <= Ref(H,-19) AND
AVGC31 > Ref(LLV(L,30),-20)) OR
( Ref(H,-20) > Ref(HHV(H,-5),-21) AND Ref(H,-20) >= 1.5 * Ref(LLV(L,29),-21) AND AVGC31 <= Ref(H,-20) AND
AVGC31 > Ref(LLV(L,29),-21)) OR
( Ref(H,-21) > Ref(HHV(H,-4),-22) AND Ref(H,-21) >= 1.5 * Ref(LLV(L,28),-22) AND AVGC31 <= Ref(H,-21) AND
AVGC31 > Ref(LLV(L,28),-22)) OR
( Ref(H,-22) > Ref(HHV(H,-3),-23) AND Ref(H,-22) >= 1.5 * Ref(LLV(L,27),-23) AND AVGC31 <= Ref(H,-22) AND
AVGC3 1 > Ref(LLV(L,27),-23)) OR
( Ref(H,-23) > Ref(HHV(H,-2),-24) AND Ref(H,-23) >= 1.5 * Ref(LLV(L,26),-24) AND AVGC31 <= Ref(H,-23) AND
AVGC31 > Ref(LLV(L,26),-24)));
Filter = x;
AddColumn (x,"X");
Rick Osborn
----- Original Message ---- From: protraderinc <protraderinc@xxxxxxxxx> To: amibroker@xxxxxxxxxxxxxxx Sent: Friday, November 16, 2007 9:15:05 AM Subject: [amibroker] Boolean Algebra Syntax
Hi,
Anyone able to understand this to convert to Amibroker? The meaning of the basic coding is after the formula.
New Super-Cycles NSC-1A NENG - 25-day - 0.5 BMI-(50%+ Gain)
C <= 5 AND ((H5 > MAXH20.6 AND H5 >= 1.5 * MINL44.6 AND AVGC3.1 <= H5 AND AVGC3.1 > MINL44.6) OR (H6 > MAXH19.7 AND H6 >= 1.5 * MINL43.7 AND AVGC3.1 <= H6 AND AVGC3.1 > MINL43.7) OR (H7 > MAXH18.8 AND H7 >= 1.5 * MINL42.8 AND AVGC3.1 <= H7 AND AVGC3.1 > MINL42.8) OR (H8 > MAXH17.9 AND H8 >= 1.5 * MINL41.9 AND AVGC3.1 <= H8 AND AVGC3.1 > MINL41.9) OR (H9 > MAXH16.10 AND H9 >= 1.5 * MINL40.10 AND AVGC3.1 <= H9 AND AVGC3.1 > MINL40.10) OR (H10 > MAXH15.11 AND H10 >= 1.5 * MINL39.11 AND AVGC3.1 <= H10 AND AVGC3.1 > MINL39.11) OR (H11 > MAXH14.12 AND H11 >= 1.5 * MINL38.12 AND AVGC3.1 <= H11 AND AVGC3.1 > MINL38.12) OR
(H12 > MAXH13.13 AND H12 >= 1.5 * MINL37.13 AND AVGC3.1 <= H12 AND AVGC3.1 > MINL37.13) OR (H13 > MAXH12.14 AND H13 >= 1.5 * MINL36.14 AND AVGC3.1 <= H13 AND AVGC3.1 > MINL36.14) OR (H14 > MAXH11.15 AND H14 >= 1.5 * MINL35.15 AND AVGC3.1 <= H14 AND AVGC3.1 > MINL35.15) OR (H15 > MAXH10.16 AND H15 >= 1.5 * MINL34.16 AND AVGC3.1 <= H15 AND AVGC3.1 > MINL34.16) OR (H16 > MAXH9.17 AND H16 >= 1.5 * MINL33.17 AND AVGC3.1 <= H16 AND AVGC3.1 > MINL33.17) OR (H17 > MAXH8.18 AND H17 >= 1.5 * MINL32.18 AND AVGC3.1 <= H17 AND AVGC3.1 > MINL32.18) OR (H18 > MAXH7.19 AND H18 >= 1.5 * MINL31.19 AND AVGC3.1 <= H18 AND AVGC3.1 > MINL31.19) OR (H19 > MAXH6.20 AND H19 >= 1.5 * MINL30.20 AND AVGC3.1 <= H19 AND AVGC3.1 > MINL30.20) OR (H20 > MAXH5.21 AND H20 >= 1.5 * MINL29.21 AND AVGC3.1 <= H20 AND AVGC3.1
> MINL29.21) OR (H21 > MAXH4.22 AND H21 >= 1.5 * MINL28.22 AND AVGC3.1 <= H21 AND AVGC3.1 > MINL28.22) OR (H22 > MAXH3.23 AND H22 >= 1.5 * MINL27.23 AND AVGC3.1 <= H22 AND AVGC3.1 > MINL27.23) OR (H23 > MAXH2.24 AND H23 >= 1.5 * MINL26.24 AND AVGC3.1 <= H23 AND AVGC3.1 > MINL26.24))
From :
http://www.worden. com/training/ default.aspx? g=posts&t= 3181
Here are some PCF examples to help everyone learn how the syntax of the easiest formula language in the industry works!
Closing price today (C )
Yesterday's closing price (one day ago) (C1)
Closing price one month ago (C21)
Closing price one week ago (5 trading days) (C5)
Closing price one year ago (250 trading days) (C250)
Closing price two years ago (500
trading days) (C500)
Closing price three years ago (750 trading days) (C750)
Closing price four years ago (1000 trading days) (C1000)
Closing price five days ago (5 trading days) (C5)
Closing price four days ago (4 trading days) (C4)
Closing price three days ago (3 trading days) (C3)
Closing price on 1/20/06 C'01/20/06'
Closing price three daye before 1/20/06 C3.'01/20/06'
Dollar Volume today: today's closing price multiplied by today's volume (C*V)
Today's high (H )
Yesterday's high (one day ago) (H1)
Highest closing price over the last six months (126 trading days) (MAXC126)
Highest high over the last 5 trading days (MAXH5)
Today's low price (L )
Yesterday's low price (one day ago) (L1)
Lowest closing price over the last six months (126 trading days) (MinC126)
Lowest low over the last 5 trading
days (MINL5)
Net Change (C-C1)
Net Change 1 Week (C-C5)
Net Change 1 Month (C-C21)
Net Change 1 Year (C-C250)
Open price today (O ) Yesterday's open price (one day ago) (O1)
One week percent change ((C-C5)/C5*100)
One month percent change ((C-C21)/C21* 100)
1-year percent change in closing price (250 trading days) ((C-C250)/C250* 100)
Percentage change in closing price from yesterday to today ((C-C1)/C1*100)
Percentage change in closing price from two days ago to yesterday ((C1-C2)/C2* 100)
Ten day price moving average (AvgC10)
Value of Price 10 day moving average yesterday (one day ago) (AvgC10.1)
Two hundred day price moving average (AvgC200)
Price Moving Average 40 Day Yesterday: forty day price moving average which excludes today's prices (AvgC40.1)
Spread Today: today's high minus today's
low (H-L)
Spread Yesterday: yesterday's high minus yesterday's low (H1-L1)
Balance of Power (BOP) value 5 days ago BOP1.5
Average BOP value over the last 30 days AVG(BOP,30) *note use of comma
Time Segmented Volume (TSV) with a period of 18 value today TSV18
TSV18 value 5 days ago TSV18.5
TSV18 value on 1/20/06 TSV18.'01/20/ 06'
Average TSV18 value over the last 30 days AVG(TSV18,30) *note use of comma
Volume today (V)
Yesterday's volume (V1)
Volume one week ago (5 trading days) (V5)
Volume one month ago (21 trading days) (V21)
Volume one year ago (250 trading days) (V250)
5 day moving average of volume (AvgV5)
3 month (63 day) moving average of volume (AvgV63)
6 month (126 day) moving average of volume (AvgV126)
__._,_.___
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
__,_._,___
|