PureBytes Links
Trading Reference Links
|
Ah, Thanks Graham.
I got it by using PT[BarCount-1]. Using LastValue works as well.
I'll have to investigate LastValue more.
Actualy - There was another problem, In:
if (PT =! PT2) {i=0;}
=! Should have been != (Wrong way around).
Final Code:
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);
WriteVal(adjz2) + " Zig2";
Plot(Close,"Price",1,styleCandle);
Plot(PZig,"Zig",2,styleLine);
Plot(PZig2,"Zig2",4,styleLine);
At 10:39 PM 7/12/2003, you wrote:
>This gives something, but not sure if it is what you want. Lastvalue changes
>the array to single value which can be used
------------------------ 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/
|