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

Re: [amibroker] Addcolumn(close,"Close", format, ......);



PureBytes Links

Trading Reference Links

This tells me that it reads the close from the *first* ticker in the 
database only:

// Test Expl and FORMAT2.afl

format = Iif( LastValue( Close) < 0.9040, 1.5, 1.2);/*Close value of 
first ticker (AUDCAD) in database*/
Filter =1;
AddColumn(C,"Close",format, ColorBlack, ColorWhite,60);

//

Seems like the foramt in
AddColumn(C,"Close", format
can only take a fixed value and not an array.

Wondering if there is a workaround here?
Not crucial, but it would be nice to be able to select the format 
depending on the ticker in the Database.

Regards

ChrisB

ChrisB wrote:
> 
> 
> Dingo
> thx for the reply.
> 
> This gives an Error 5: incorrect argument type.
> 
> I need to control the format variable on a per ticker basis.
> I will play around with this some more in the meantime.
> 
> Regards
> 
> ChrisB
> 
> dingo wrote:
>  >
>  >
>  > Put the formats in quotes: format = IIf( StrRight(Name(),3) == 
> "JPY","3.2",
>  > "4.4");
>  >
>  > I haven't tried it but it just might work.
>  >
>  > d
>  >
>  > > -----Original Message-----
>  > > From: amibroker@xxxxxxxxxxxxxxx 
> <mailto:amibroker%40yahoogroups.com> <mailto:amibroker%40yahoogroups.com>
>  > > [mailto:amibroker@xxxxxxxxxxxxxxx <mailto:amibroker%40yahoogroups.com>
>  > <mailto:amibroker%40yahoogroups.com>] On Behalf Of ChrisB
>  > > Sent: Monday, July 09, 2007 10:44 PM
>  > > To: amibroker@xxxxxxxxxxxxxxx <mailto:amibroker%40yahoogroups.com> 
> <mailto:amibroker%40yahoogroups.com>
>  > > Subject: [amibroker] Addcolumn(close,"Close", format, ......);
>  > >
>  > > Hi,
>  > >
>  > > I want to use two decimal points when the ticker is xxxJPY
>  > > and four decimal points when the ticker is NOT xxxJPY
>  > >
>  > > I have used ...
>  > >
>  > > // Test Expl Formatting for AUDJPY
>  > >
>  > > format = IIf( StrRight(Name(),3) == "JPY",3.2, 4.4);
>  > >
>  > > Filter = 1;
>  > >
>  > > AddColumn(C," Close ", format, colorBlack, colorWhite, 60);
>  > >
>  > > // end
>  > >
>  > >
>  > > This works *only* if I have a Yen pair selected and set Apply
>  > > to Current
>  > > Symbol.
>  > >
>  > > If I select Apply to *All Symbols* I still get four decimal points.
>  > > See attached.
>  > >
>  > > How may I fix this?
>  > >
>  > > Regards
>  > >
>  > > ChrisB
>  > >
>  > >
>  > >
>  > >
>  > > 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/ <http://www.amibroker.com/devlog/> 
> <http://www.amibroker.com/devlog/ <http://www.amibroker.com/devlog/>>
>  > >
>  > > For other support material please check also:
>  > > http://www.amibroker.com/support.html 
> <http://www.amibroker.com/support.html>
>  > <http://www.amibroker.com/support.html 
> <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/