Reply To: Datafield Script Support

Optuma Forums Optuma Scripting Datafield Script Support Reply To: Datafield Script Support

  • Topics: 29
  • Replies: 1,471
  • Posts: 1,500

Hi Mandeep,

Firstly with the [1][2] question. It is whatever the base chart is unless you have “changed” the time frame. ie if you add this script to a Daily chart than [1] will be the previous day and [2] will be 2 days back.

Remember that even if the DataField has Monthly data, it will still have a value for every day of the month if you add it to a daily chart.

The way to get around that is to change the time frame. eg

Debt = Month(DATAFIELD(FEED=FD, FIELD=TotalDebt));

Another way you can do it is to use the Change() function. In there you can specify that you want to go back a year and it is smart enough to look at the dates to do that.

Hope that helps


Pin It on Pinterest

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.