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

[amibroker] Re: Can different string characters be stored in arrays?



PureBytes Links

Trading Reference Links

Tomasz,

Thanks for the additional info....as usual quite helpful and much 
appreciated!! (;->)

Just a couple more questions:

1)  Is there any way to make the displayed single-characters into 
a 'bold' font or even change the entire font-table of the ascii 
character set for use with AddColumn?

2)  Is it possible at all to display a string of length greater than 
1 using AddTextColumn and an array of variable-length strings, such 
as, for example, .... signal[i]="Buy" and signal[i+1}="Sell" or any 
other strings of desired composition?

Again thanks for your assistance on this....

Buzz


--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <groups@xxx> 
wrote:
>
> Or use Asc function
> http://www.amibroker.com/guide/afl/afl_view.php?id=307
> 
> AddColumn(IIf(Buy, Asc("B"), IIf(Sell, Asc("S"), Asc("-"))), "Sig", 
formatChar, etc...);
> 
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message ----- 
> From: "gp_sydney" <gp.investment@xxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Monday, September 22, 2008 12:22 PM
> Subject: [amibroker] Re: Can different string characters be stored 
in arrays?
> 
> 
> > Use "AddColumn" with the "formatChar" specifier:
> > 
> > AddColumn(IIf(Buy, 66, IIf(Sell, 83, 45)), "Sig", formatChar, 
etc...);
> > 
> > Those numbers are the ASCII character codes in decimal for the 
letters
> > "B", "S", and "-" respectively. For a complete list, see here:
> > 
> > http://www.asciitable.com
> > 
> > Regards,
> > GP
> > 
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "Buzz M. Ross" <buzzmr@> wrote:
> >>
> >> If possible, I'd like to display different string characters in 
a 
> >> column using AddTextColumn based upon some 'source' array values 
at 
> >> particular bar index values.  In essence, the kind of 
algorithmic 
> >> code I'd like to implement follows.  However, in attempting to 
do 
> >> this, I get an AFL error 8 'type mismatch' verify message in the 
> >> formula editor for the 'sig[i]' elements shown below.
> >> 
> >> Is there any way 'conditional' text strings can be displayed in 
> >> columns for any version of AB using AFL?  I'm currently using 
version 
> >> 4.74, which other than this particular problem, is good enough 
for 
> >> most of my AB needs.
> >> 
> >> Here's the intended algoritm:
> >> ----------------------------------------------------------
> >> 
> >> Buy = .....;  // generate 'Buy' array signals
> >> Sell = .....; // generate 'Sell' array signals
> >> Sell = Exrem(Sell,Buy);  /* get rid of successive sell signals 
till 
> >>                                       next 'Buy' sig */
> >> 
> >> 
> >> /*  Now, I want to create an array of text characters that 
correspond 
> >> to the Buy and Sell signals that can be displayed in a text 
column */
> >> 
> >> for( i = 0; i < BarCount; i++ )
> >> {
> >> sig[i] = "-";  // no signal present
> >> if( Buy[i] ) sig[i] = "B";   // Buy sig present
> >> if{ Sell[i] )  sig[i] = "S";  // Sell sig present
> >> }
> >> 
> >> Filter = 1;
> >> 
> >> AddTextColumn(sig,"Sig",2.3,colorYellow,IIf
(Buy,colorDarkGreen,IIF
> >> (Sell,colorRed,colorBlack)));  // colorize text cell 
appropriately
> >> 
> >> ---------------------------------------
> >> 
> >> 
> >> I'd appreciate info on whether or not this is actually doable in 
AB, 
> >> and if so, how to fix code above to work OR if this requires a 
more 
> >> recent version of AB.
> >> 
> >> Thanks!!
> >> 
> >> Buzz
> >>
> > 
> > 
> > 
> > ------------------------------------
> > 
> > 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/