PureBytes Links
Trading Reference Links
|
Wow, thanks Graham ... boy do I feel like an idiot.
MR
--- In amibroker@xxxxxxxxxxxxxxx, "Graham" <gkavanagh@xxxx> wrote:
> Try this, it seemed the yellow was causing the problem ROC(15)
instead of
> ROC(C,15) and I also changed the values slightly for the red,
yellow and
> green limits so all numbers would be covered
>
>
>
> //Program
>
> Range = (Close-Low)/(High-Low)*100;
>
> Vol = (V/MA(V,30))*100;
>
> //Strength Meter
>
> Green = ROC(C,15)>=10;
>
> Yellow = ROC(C,15)>-10.0 AND ROC(C,15)<10;
>
> Red = ROC(C,15) <= -10;
>
> Buy=C>0 AND C<15 AND
>
> RSI( 14 )>70 AND
>
> ADX(14)>30 AND
>
> MA(V,30)>100000 AND
>
> V>200000;
>
> Filter=1;
>
> //Filter=Buy;
>
> AddColumn(C,"close",1.2);
>
> AddColumn(MA(C,10),"10dma",1);
>
> AddColumn(ADX(14),"ADX",1);
>
> AddColumn(RSI(14),"RSI",1.2);
>
> AddColumn(ROC(C,5),"5 D Chg",1.2);
>
> AddColumn(Range,"Rng%",1.2);
>
> AddColumn(Vol,"VOL%",1);
>
> AddColumn(StochD(14,3),"STO",1);
>
> AddColumn(V,"Volume",1);
>
> AddColumn(MA(C,10),"10dma",1.2);
>
> color = IIf(green, colorGreen, IIf(yellow, colorYellow,
colorRed));
>
> AddTextColumn( WriteIf(Green,"GRN",WriteIf
(Yellow,"YEL","RED")),"Strength
> Meter" , 1, colorDefault, color);
>
>
>
> Cheers,
> Graham
> http://groups.msn.com/asxsharetrading
> http://groups.msn.com/fmsaustralia
>
> -----Original Message-----
> From: mroman59 [mailto:mroman59@x...]
> Sent: Tuesday, 30 December 2003 9:19 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Graham- please check code
>
>
> Hello Graham
>
> The other day I posted and you replyed concerning my code question
> in AB. I spoke to early when I said that the code you gave me was
> working correctly. I am having sum bugs in the program and would
> like to know if you could take a look at it? The only problem
right
> now is that any stock that fills the criteria for the "Red"
variable
> is not showing up as the color red in the Strength Meter column.
> The colors greeen and yellow work however. I varified the colors
> with the stocks raw data and by the following add columns below:
>
> //AddColumn(result = IIf(Green,1,0),"GRN");
> //AddColumn(result = IIf( Yellow,2,0),"YEL"); //AddColumn(result =
IIf(
> Red,3,0),"RED");
>
> The above code, when active reports either a 1,2 or 3 in the column
> but the stocks with a 3 are not showing up as a red color. The
> following code is part of my program and you may have to chage the
> criteria for "Buy" to generate stocks with the value of 3 to see
> what I am talking about. I have tried various variations of the
> WriteIF statement, but with no luck. Your help is appreciated, MR
>
>
> //Program
>
> Range = (Close-Low)/(High-Low)*100;
> Vol = (V/MA(V,30))*100;
>
> //Strength Meter
> Green = ROC(C,15)>10;
> Yellow = ROC(15)>-9.0 AND ROC(C,15)<9.999;
> Red = ROC(C,15) < -9.999;
>
> Buy=C>0 AND C<15 AND
> RSI( 14 )>70 AND
> ADX(14)>30 AND
> MA(V,30)>100000 AND
> V>200000;
>
> Filter=Buy;
>
>
> AddColumn(C,"close",1.2);
> AddColumn(MA(C,10),"10dma",1);
> AddColumn(ADX(14),"ADX",1);
> AddColumn(RSI(14),"RSI",1.2);
> AddColumn(ROC(C,5),"5 D Chg",1.2);
> AddColumn(Range,"Rng%",1.2);
> AddColumn(Vol,"VOL%",1);
> AddColumn(StochD(14,3),"STO",1);
> AddColumn(V,"Volume",1);
> AddColumn(MA(C,10),"10dma",1.2);
> //AddColumn(result = IIf(Green,1,0),"GRN");
> //AddColumn(result = IIf( Yellow,2,0),"YEL"); //AddColumn(result =
IIf(
> Red,3,0),"RED"); AddTextColumn( WriteIf(Green,"GRN",WriteIf color =
> IIf(green, colorGreen, IIf(yellow, colorYellow, colorRed));
AddTextColumn(
> WriteIf(Green,"GRN",WriteIf (Yellow,"YEL","RED")),"Stregth Meter");
> color = IIf(green, colorGreen, IIf(yellow, colorYellow, colorRed));
> (Yellow,"YEL","RED")),"Strength Meter", 1, textColor =
colorDefault,
> color);
>
>
>
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> 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
>
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/amibroker/
>
> To unsubscribe from this group, send an email to:
> amibroker-unsubscribe@xxxxxxxxxxxxxxx
>
> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
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
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|