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

RE: [amibroker] Finding & Ploting 2 Zig's



PureBytes Links

Trading Reference Links

This gives something, but not sure if it is what you want. Lastvalue changes
the array to single value which can be used

PT = LastValue(TroughBars(Close,7,1));
PT2 = PT;
PZig = Zig(Close,7);

for( i = (7*10); i > 1; i-- )
   {
    adjz2 = i/10;
    PT2 = LastValue(TroughBars(Close,adjz2));
    if (PT =! PT2) {i=0;}
   }
PZig2 = Zig(Close,adjz2);

Plot(Close,"Price",1,styleCandle);
Plot(PZig,"Zig",2,styleLine);
Plot(PZig2,"Zig2",4,styleLine);

Cheers,
Graham
http://groups.msn.com/asxsharetrading
http://groups.msn.com/fmsaustralia 

-----Original Message-----
From: Michael.S.G. [mailto:OzFalcon@xxxxxxxx] 
Sent: Sunday, 7 December 2003 6:34 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Finding & Ploting 2 Zig's


I'd like to plot a Zig line, Then have Amibroker cycle down in zig settings 
untill the last trough changes - Then Print that Zig line as well.

Im currently stuck in identifying when the zig settings change the last 
troughbar.
An error occurs with this line " if (PT =! PT2) {i=0;} " stating I can not 
use an array here. Im sure there is a simple way of doing this - I just 
can't see it!.

Here is my code sofar:
// Plot Next zig...
// Use Zig 7
PT = TroughBars(Close,7,1);
PT2 = PT;
PZig = Zig(Close,7);

for( i = (7*10); i > 1; i-- )
   {
    adjz2 = i/10;
    PT2 = TroughBars(Close,adjz2);
    if (PT =! PT2) {i=0;}
   }
PZig2 = Zig(Close,adjz2);

Plot(Close,"Price",1,styleCandle);
Plot(PZig,"Zig",2,styleLine);
Plot(PZig2,"Zig2",4,styleLine);





------------------------ 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
---------------------------------------------------------------------~->

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/ 


------------------------ 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
---------------------------------------------------------------------~->

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/