PureBytes Links
Trading Reference Links
|
You could try this, it may work
varOversold = 0;
i = barcount-1;
For(x=1;x<=17;x++)
{
if( tdroc[i-x-1] <= varOversoldSignal[i] )
{ varOversold[i] = 1+ varOversold[i]; }
}
Cheers,
Graham
http://e-wire.net.au/~eb_kavan/
-----Original Message-----
From: Brian [mailto:brian@xxxxxxxxxxxxxxxx]
Sent: Sunday, May 02, 2004 4:29 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] AFL syntax question
I am trying to consolidate this code into an array or a "for" loop,
so that it does the same thing, but more efficiently... can't seem
to find a decent example of AFL syntax right now... thanks!
varDuration = 16 // I would like to use this one variable, instead
of using Ref(TDROC1,-16) and so on...
// Identify oversold conditions, marked with red arrow to denote
downtrend
varOversold = IIf(Ref(TDROC1,-16)<=varOversoldSignal
AND Ref(TDROC1,-15)<=varOversoldSignal
AND Ref(TDROC1,-14)<=varOversoldSignal
AND Ref(TDROC1,-13)<=varOversoldSignal
AND Ref(TDROC1,-12)<=varOversoldSignal
AND Ref(TDROC1,-11)<=varOversoldSignal
AND Ref(TDROC1,-10)<=varOversoldSignal
AND Ref(TDROC1,-9)<=varOversoldSignal
AND Ref(TDROC1,-8)<=varOversoldSignal
AND Ref(TDROC1,-7)<=varOversoldSignal
AND Ref(TDROC1,-6)<=varOversoldSignal
AND Ref(TDROC1,-5)<=varOversoldSignal
AND Ref(TDROC1,-4)<=varOversoldSignal
AND Ref(TDROC1,-3)<=varOversoldSignal
AND Ref(TDROC1,-2)<=varOversoldSignal
AND Ref(TDROC1,-1)<=varOversoldSignal
AND TDROC1<=varOversoldSignal ,1,0);
IIf(varOversold>0,PlotShapes
(shapeHollowDownArrow*varOversold,colorRed),0);
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 Links
------------------------ 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
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/
|