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

[amibroker] Coding Gurus - please help



PureBytes Links

Trading Reference Links

I'm trying to create a function to log operations to a file ONLY 
when I have a BUY signal but I think I'm missing something... here's 
my code:

function AddToLogFile(sLogFileName,sLine)
     {
        // bunch of statements...
	return True;
     }


Buy=validCondition;


logged = iif(Buy,AddToLogFile("LogFile.log","My text"),false);


----------------------

problem is that the AddToLogFile is getting executed all the time, 
even when Buy == 0.....

can anyone hep? Thanks






Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.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/