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

RE: [amibroker] IF / ELSE questions



PureBytes Links

Trading Reference Links




<SPAN 
class=262224804-16052003>Sid,
 
What 
is the Else side of the equation? What to do if <FONT color=#0000ff 
face="Courier New, Courier" size=2>Ref<FONT face="Courier New, Courier" 
size=2>(BBUY,-<FONT color=#ff00ff face="Courier New, Courier" 
size=2>1)<<FONT 
color=#ff00ff face="Courier New, Courier" size=2>99999<FONT 
face="Courier New, Courier" size=2> AND H>=<FONT 
color=#0000ff face="Courier New, Courier" size=2>Ref<FONT 
face="Courier New, Courier" size=2>(BBUY,-<FONT color=#ff00ff 
face="Courier New, Courier" size=2>1<FONT face="Courier New, Courier" 
size=2>) is False?     
 
Regards, 
Jayson 
<FONT face=Tahoma 
size=2>-----Original Message-----From: Sidney Kaiser 
[mailto:s9kaiser@xxxxxxxxxxx]Sent: Friday, May 16, 2003 12:42 
AMTo: AmiBroker@xxxxxxxxxxxxxxxSubject: [amibroker] IF / 
ELSE questionsWow...I was trying to convert some 
Tradestation code to AB and it looked like using the IF / ELSE construct would 
simplify my life....guess not.This bit of code generated error messages 
that make it appear I cannot use the normal AB data arrays (and use Ref to pick 
up yesterdays values).<FONT color=#800000 face="Courier New, Courier" 
size=2>if (<FONT 
color=#0000ff face="Courier New, Courier" size=2>Ref<FONT 
face="Courier New, Courier" size=2>(BBUY,-<FONT color=#ff00ff 
face="Courier New, Courier" size=2>1<FONT face="Courier New, Courier" 
size=2>)<<FONT color=#ff00ff face="Courier New, Courier" 
size=2>99999 AND 
H>=<FONT color=#0000ff face="Courier New, Courier" 
size=2>Ref(BBUY,-<FONT 
color=#ff00ff face="Courier New, Courier" size=2>1<FONT 
face="Courier New, Courier" size=2>))     LXSTOP = 
L-EXITADD;Does this mean 
I have to put it within a FOR / WHILE loop that goes thru all the data in this 
form:if (BBUY[n-1}<99999 and H[n]>= 
BBUY[n-1])        LXSTOP[n] 
= 
L[n]-exitadd;       //exitadd 
is a constant hereThis would really add to the complication for 
me.Is it possible to code the original line using just normal AB data 
arrays without the loop and all the subscripts?  If so, how?  I tried 
IIF but ran into a problem with specifying the not true 
condition.TIA SidPS: I can see I may have further 
questions as I work my way through the TS code.  :(Send 
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
suggest@xxxxxxxxxxxxx-----------------------------------------Post 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor












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 the Yahoo! Terms of Service.