You don't want to do this ... Buy = C;
Buy is an array that contains 0 ( No Buy ) or 1 ( Buy ) in it. It can I believe have other values at some stage of processing which I won't bother to go into deeper here ... Try ... Buy = Cross( C, MA(C,20) ); Sell = Cross( MA(C,20), C ); --- In [email protected], "laster" <[EMAIL PROTECTED]> wrote: > > I was hoping the function Buy to return a False/True that I could use in an > if or while statement. I can't figure it out how to access it. > > For instance, Buy=Cross( C, MA(C,20 ) ); should be true when the cross > occurs. Right? Wrong? > > > > I am trying: > > Reason2= Cross( C, MA(C,20 ) ); > > IIf(IsNull( Reason2), 0, Buy=C); Expecting a null value whenever there is > no cross, but it does not work. > > > > Same results with IsEmpty and istrue. > > If I try to access it with If, I don't know which part of the array to call. > :-( > > > > Is there a way to look into the array Reason2 for debugging purposes? > > I guess I should move the code to a dll and call it from AFL. > > Thanks in advance for any thoughts. > > Jerry > 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/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/amibroker/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
