|
Here is an example: price = SelectedValue(C); Title = EncodeColor(IIf(price<20,colorBlue,colorRed))+" asdkfajf"; When you use selectedvalue you don’t
need the lastvalue because in this case you don’t use an array. In your code below you use BPrice which is
probably of array type. So you would have to use lastvalue(BPrice) However this is not what you would like to
show. In other words it would not work on bar by bar basis with the selected value. You could only calculate
something from the selected value to the LAST BPrice. From: Thanks Thomas but where do I put the
LastValue?? Here is code snippit I am trying: AboveBuy = 100*(SelectedValue(C) - BPrice)/BPrice; ColorABuy = IIf(AboveBuy>0,1,0);
<<<<<<<<< lastValue Here???????? AboveStop = 100*(SelectedValue(C) - Stop)/Stop; ColorAStop = LastValue(IIf(AboveStop>0,colorGreen,colorRed));
<<<<<<<<<<<<<< Or lastvalue here?? Title = EncodeColor(colorBlue) + Name() + " " + FullName() + " " + Date() + "\n" + "Above Buy = " + EncodeColor(colorGreen) + WriteVal(AboveBuy) + "% " + EncodeColor(colorBlue) + "Above Stop = " + EncodeColor(colorAstop) + WriteVal(AboveStop From:
Ken, encodecolor in title doesn’t allow to use arrays. So you can only use the lastvalue(); From: I want to
color a value in a Title statement green or red depending on above or below
zero. I have tried
IIf statements with Encodecolor variables, but keep getting type mismatches or
invalid operation in the Title statement. Can someone
tell me how to color a value (written with WriteVal) depending on a
condition, in a Title statement? Thanks, Ken 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
SPONSORED LINKS
YAHOO! GROUPS LINKS
__,_._,___ |
- RE: [amibroker] Conditional Encodecolor Thomas Z.
- Re: [amibroker] Conditional Encodecolor wavemechanic
- RE: [amibroker] Conditional Encodecolor Thomas Z.
- RE: [amibroker] Conditional Encodecolor Terry
