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

[amibroker] re: Library downloads...Thanks to all who replied!!



PureBytes Links

Trading Reference Links

Graeme

I do not know Tradestation but I believe your solution lies with AB's IIF
function
(refer: http://www.amibroker.com/guide/afl/afl_view.php?name=IIF)

Something along the lines...

Period =
IIF(linearregvalue(close,Counter,-1)>linearRegValue(Close,Period,-1),
		 Counter,
		 Null/*or whatever the false value should be*/);

Hope this helps.
______
peterj 

-----Original Message-----
From: graeme_oswin [mailto:goswin@xxxxxxxxxxx] 
Sent: Tuesday, 4 May 2004 11:33 p
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Conditional looping question

Dear all,

Is it possible to implement Conditional looping in AFL along the 
lines of the following. For example what is the most effective way of 
translating this Tradestation language example. ( I think.)

snip ---------------------------------
For Counter = 13 downto 7 Begin
 if linearregvalue(close,Counter,-1)>linearRegValue(Close,Period,-1)  
then Period=Counter;
End;
Cord=linearregvalue(Close,Period,-1);
---------------------------------

>From what I read I can substitute the appropriate AFL keywords (eg: 
linearregvalue = linearreg etc...

But how do you implement a conditional loop using arrays? AFL "if" 
command does not appear to operate on arrays only boolean values.

I'm sure its possible but I'm programmably challenged.

Regards,

Graeme Oswin



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