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

[amibroker] Re: Need help with ALF



PureBytes Links

Trading Reference Links

 Hi. I just wanted to suggest this:


        ratea = IIf(wayup OR waydown,rate,Null);

	rateb=IIf(medium,rate,Null);

        Plot(ratea,"rate",colorRed,styleHistogram);
	Plot(rateb,"rate",colorBlue,styleLine);

Denis



--- In amibroker@xxxxxxxxxxxxxxx, "john gibb" <jgibb1@xxxx> wrote:
> Hi PeterJ and Stephane,
> 
> Your suggestions, while interesting, simply plot a histogram and a 
line
> which borders it.
> 
> And thanks for reminding me that IIf can be used without needing 
to assign
> its result to a left-side-of-the-equation variable!
> 
> In any case, I think I will be able to adapt Anthony's code, in 
message
> 61362, and get what I need.
> 
> thanks
> 
> -john
> 
> 
> ----- Original Message ----- 
> From: "PeterJ (wpq)" <pjcwebpagequery@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Wednesday, March 31, 2004 2:16 PM
> Subject: RE: [amibroker] variable styles for same array
> 
> 
> John
> 
> Try
> 
> iif (wayup OR waydown,
>         Plot(rate,"",colorRed,styleHistogram),
>         Plot(rate,"",colorRed,styleLine));
> 
> PeterJ
> E&OE :-)
> 
> -----Original Message-----
> From: john gibb [mailto:jgibb1@x...]
> Sent: Thursday, 1 April 2004 7:56 a
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] variable styles for same array
> 
> Hi,
> 
> I am trying to achieve the indicator style shown on the attached 
(from
> stockcharts.com) with something like:
> 
>     wayup = rate >= -20;
>     medium = rate < -20 AND rate >= -80;
>     waydown = rate <- 80;
>     s = IIf(wayup OR waydown,styleHistogram,styleLine);
>     Plot(rate,"rate",colorRed,s);
> 
> but i get this error on the 's' in the Plot statement:
> 
>     3-th argument of function call has invalid (or unsupported) 
type.
> 
> I also tried:
> 
>     Plot(rate,"rate",colorRed,LastValue(s));
> 
> but got only a Histogram or Line, not both
> 
> and I tried:
> 
>     if (wayup OR waydown)
>         Plot(rate,"",colorRed,styleHistogram);
>     else
>         Plot(rate,"",colorRed,styleLine);
> 
> but got:
> 
>     "Condition in IF, WHILE, FOR statements has to be Numeric or 
Boolean
> type. You can not use array here."
> 
> Any suggestions?
> 
> thanks
> 
> -john
> 
> 
> 
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> 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
> 
> 
> 
> 
> 
> 
> 
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> 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



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/