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

Re: [amibroker] variable styles for same array



PureBytes Links

Trading Reference Links

John,

Probably not an answer to your question...Note: my background color is light
grey.

Plot(StochK(14),"",1,1);

x=IIf(StochK(14)>30,30,StochK(14));

Plot(x,"",colorLightGrey,2);

Plot(30,"",4,2);

Plot(70,"",colorLightGrey,2);

Plot(StochK(14),"",5,2);

Plot(30,"",2,1);Plot(70,"",2,1);

//Plot(StochK(14),"",6,2);

y=IIf(StochK(14)<=70 AND StochK(14)>=30,colorYellow,0);

Plot(y,"",colorLightGrey,2);



Anthony

----- Original Message ----- 
From: "john gibb" <jgibb1@xxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Wednesday, March 31, 2004 4:55 PM
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@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
>
>
>
>
>



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