amibroker

HomeKnowledge Base

How to change the title line in my custom indicator ?

To have custom title in the indicator window, you can define Title variable within the indicator’s code, e.g:

Title "This is my title: " Name() + " - Close: " WriteValClose )

AmiBroker versions 4.60.2 and higher allow you also to you use special tokens in Title variable that are replaced by appropriate values at run-time.

  • if you use {{VALUES}} inside Title string it will be replaced by automatic-values generated by Plot function calls.
  • if you use {{NAME}} it will be replaced by ticker symbol.
  • if you use {{DATE}} it will be replaced by selected date
  • if you use {{INTERVAL}} it will be replaced by name of the interval
  • Title "{{NAME}} - {{INTERVAL}} {{DATE}} - MyChart : {{VALUES}}"

    2 Responses to “How to change the title line in my custom indicator ?”

    1. Rick
      March 7th, 2006 | 3:27 pm

      Is there a way to format the {{VALUES}} numbers. On my charts prices that are whole dollar amounts show no decimal places.

    2. March 7th, 2006 | 3:56 pm

      No, these values are automatically formatted with minimum number of digits required to display the value accurrately (whole numbers do not need decimals). If you need your own formatting, use WriveVal() function that allows to specify number of decimal places, or StrFormat() that allows complete control over number formatting.