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

[amibroker] Novice AFL Variable Assignment Question



PureBytes Links

Trading Reference Links

I think I must be missing something about assigning values to arrays. Can
you assign a string to an array? For example in the code below, I am trying
to create the systemname array so that it can be used in a single column in
an exploration to show in this case what system was found for the symbol.
The code below works

 

 

for( i = 0; i < BarCount; i++ )

       {

       if( BBandLong[ i ] )

              { 

              SystemName[ i ] = 1 ;

              }

 

       if( NearChannelBreakLong[ i ] )

              { 

              SystemName[ i ] = 2;

              } 

       }

 

But I would prefer to do something like:

 

for( i = 0; i < BarCount; i++ )

       {

       if( BBandLong[ i ] )

              { 

              SystemName[ i ] = "SystemName1" ;

              }

 

       if( NearChannelBreakLong[ i ] )

              { 

              SystemName[ i ] = "SystemName2;

              } 

       }

 

So that I could use Strings instead of numbers in the exploration and maybe
latter in tooltips.

 

Ticker Date/Time     WatchType     

AC     11/5/2004     1.00   

AMAT   11/5/2004     1.00   

BRLI   11/5/2004     1.00   

CBH    11/5/2004     1.00   

DDR    11/5/2004     1.00   

HMT    11/5/2004     1.00   

IDCC   11/5/2004     1.00   

INGP   11/5/2004     1.00   

MERX   11/5/2004     1.00   

ROP    11/5/2004     1.00   

UTSI   11/5/2004     1.00   

 

Any suggestions and what am I missing? Sorry for the newbie kind of
question. 



[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

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/