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

Re: [amibroker] Re: Boolean to set 'styleThick' in Plot()



PureBytes Links

Trading Reference Links

Hi - The color arg will take an array so you can use color to highlight 
certain bars instead of style. Also, you can often create a workaround to 
get at what you want - for example, you could try plotting your original 
array with, say, styleHistogram, then create a 2nd array with only the bars 
you want to be thick ( replace the other bars with NULL ) and plot it on top 
of the 1st array...

Steve

----- Original Message ----- 
From: "sidhartha70" <sidhartha70@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, June 17, 2008 12:27 PM
Subject: [amibroker] Re: Boolean to set 'styleThick' in Plot()


> Now I've got it working, it's thrown up another problem...
>
> It seems the style for ALL the bars is set by the current value...
> i.e. if the current bar triggers styleThick to be True... then all
> previous bars are also plotted styleThick...
>
> I guess general question... Is it possible to make only some bars
> styleThick and not all...?
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "sidhartha70" <sidhartha70@xxx> wrote:
>>
>> I think you're right Fred. If I use LastValue() it works.
>>
>> Thanks
>>
>> --- In amibroker@xxxxxxxxxxxxxxx, "sidhartha70" <sidhartha70@> wrote:
>> >
>> > Ummm. Thanks Fred.
>> >
>> > So is '4*False' not an array...? I guess not.
>> >
>> > --- In amibroker@xxxxxxxxxxxxxxx, Fred Tonetti <ftonetti@> wrote:
>> > >
>> > > I could be wrong but I don't think the style parameter in a plot
>> > statement
>> > > can be an array i.e.
>> > >
>> > >
>> > >
>> > > Plot(C, "X", colorWhite, iif(C > O, 4, 0));
>> > >
>> > >
>> > >
>> > > Yields the same syntax error .
>> > >
>> > >
>> > >
>> > >   _____
>> > >
>> > > From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]
>> > On Behalf
>> > > Of sidhartha70
>> > > Sent: Tuesday, June 17, 2008 10:53 AM
>> > > To: amibroker@xxxxxxxxxxxxxxx
>> > > Subject: [amibroker] Re: Boolean to set 'styleThick' in Plot()
>> > >
>> > >
>> > >
>> > > Bill,
>> > >
>> > > Take a look at the following code,
>> > >
>> > > BarColor = colorWhite;
>> > > BarThick = False;
>> > > //BarColor=IIf(C>O,colorGreen,BarColor);
>> > > BarThick = IIf( barcolor == colorWhite, True, False );
>> > > Plot( C, "x", colorWhite, 4*barthick );
>> > >
>> > > This works fine... However, as soon as I uncomment the third line I
>> > > get Error 5... No idea why.
>> > >
>> > > Can you shed any light...?
>> > >
>> > > Thanks
>> > >
>> > > --- In amibroker@xxxxxxxxx <mailto:amibroker%40yahoogroups.com>
>> ps.com,
>> > > "wavemechanic" <timesarrow@> wrote:
>> > > >
>> > > > How are you defining barthick?
>> > > >
>> > > > Bill
>> > > > ----- Original Message ----- 
>> > > > From: sidhartha70
>> > > > To: amibroker@xxxxxxxxx <mailto:amibroker%40yahoogroups.com>
> ps.com
>> > > > Sent: Tuesday, June 17, 2008 10:21 AM
>> > > > Subject: [amibroker] Re: Boolean to set 'styleThick' in Plot()
>> > > >
>> > > >
>> > > > The weird thing is Bill, if I do,
>> > > >
>> > > > Plot( C, "Close", BarColor , styleNoTitle | styleThick*False |
>> > > > GetPriceStyle() );
>> > > >
>> > > >
>> > > > Then it's fine. As soon as I replace 'False' with 'BarThick' I get
>> > > > Error 5.
>> > > >
>> > > >
>> > > > --- In amibroker@xxxxxxxxx <mailto:amibroker%40yahoogroups.com>
>> > ps.com,
>> > > "sidhartha70" <sidhartha70@> wrote:
>> > > > >
>> > > > > I'm lloking at bars actually Bill. Does that makea
> difference...?
>> > > > >
>> > > > > --- In amibroker@xxxxxxxxx <mailto:amibroker%40yahoogroups.com>
>> > ps.com,
>> > > "wavemechanic" <timesarrow@>
>> > > wrote:
>> > > > > >
>> > > > > > Do you have candlestick chosen for your default setting? Your
>> > > code
>> > > > > works for all except candlestick.
>> > > > > >
>> > > > > > Bill
>> > > > > > ----- Original Message ----- 
>> > > > > > From: sidhartha70
>> > > > > > To: amibroker@xxxxxxxxx <mailto:amibroker%40yahoogroups.com>
>> > ps.com
>> > > > > > Sent: Tuesday, June 17, 2008 7:37 AM
>> > > > > > Subject: [amibroker] Boolean to set 'styleThick' in Plot()
>> > > > > >
>> > > > > >
>> > > > > > Hi All,
>> > > > > >
>> > > > > > I'm trying to make the style of plotting price bars
> dependent on
>> > > > some
>> > > > > > boolean value... i.e. if the boolean is true then I want
>> > > > 'styleThick'
>> > > > > > bars... else normal.
>> > > > > >
>> > > > > > However, it doesn't seem to be working... the following,
>> > > > > >
>> > > > > > Plot( C, "Close", BarColor , styleNoTitle |
>> > > styleThick*BarThick |
>> > > > > > GetPriceStyle() );
>> > > > > >
>> > > > > > Gives an incorrect argument type, where 'BarThick' is my
>> > > booelan.
>> > > > > >
>> > > > > > If this is not correct, can anyone suggest how I can correct
>> > > this or
>> > > > > > achieve what I want...?
>> > > > > >
>> > > > > > 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 NEW RELEASE ANNOUNCEMENTS and other news always check
>> > > DEVLOG:
>> > > > > > http://www.amibroke <http://www.amibroker.com/devlog/>
>> > r.com/devlog/
>> > > > > >
>> > > > > > For other support material please check also:
>> > > > > > http://www.amibroke <http://www.amibroker.com/support.html>
>> > > r.com/support.html
>> > > > > > Yahoo! Groups Links
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > > ----------------------------------------------------------
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > > No virus found in this incoming message.
>> > > > > > Checked by AVG.
>> > > > > > Version: 8.0.100 / Virus Database: 270.3.0/1505 - Release
> Date:
>> > > > > 6/16/2008 7:20 AM
>> > > > > >
>> > > > >
>> > > >
>> > > >
>> > > >
>> > > > ------------------------------------
>> > > >
>> > > > 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
>> > > > http://www.amibroke <http://www.amibroker.com/devlog/>
> r.com/devlog/
>> > > >
>> > > > For other support material please check also:
>> > > > http://www.amibroke <http://www.amibroker.com/support.html>
>> > > r.com/support.html
>> > > > Yahoo! Groups Links
>> > > >
>> > > >
>> > > >
>> > > >
>> > > >
>> > > >
>> > > ----------------------------------------------------------
>> > > >
>> > > >
>> > > >
>> > > > No virus found in this incoming message.
>> > > > Checked by AVG.
>> > > > Version: 8.0.100 / Virus Database: 270.3.0/1505 - Release Date:
>> > > 6/16/2008 7:20 AM
>> > > >
>> > >
>> > >
>> > >
>> > >
>> > >   _____
>> > >
>> > > I am using the free version of SPAMfighter for private users.
>> > > It has removed 479 spam emails to date.
>> > > Paying users do not have this message in their emails.
>> > > Try SPAMfighter <http://www.spamfighter.com/len>  for free now!
>> > >
>> >
>>
>
>
>
> ------------------------------------
>
> 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> For other support material please check also:
> http://www.amibroker.com/support.html
> Yahoo! Groups Links
>
>
>
> 



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

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

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