Reply To: Using a dynamic POWER function calculation

Optuma Forums Optuma Scripting Using a dynamic POWER function calculation Reply To: Using a dynamic POWER function calculation

#54137
Dean
  • Topics: 13
  • Replies: 25
  • Posts: 38

Thanks Mathew, really appreciate the advice, and the time you have taken. One part of your response:

“Something to keep in mind with Optuma is that we do not run each line in the script for each bar but we fully calculate each line…”

…is possibly one of the most important insights into how Optuma works that I’ve ever encountered. That has enlightened my understanding of how Optuma scripting works considerably. Thank you.

I understand the logic of the recursive solution you provided and gave it a shot. After a fair bit of fiddling around I was able to get the script to evaluate as desired but there were other unwanted side-effects if it was applied to a chart (e.g. existing Time Price Measures all bunched up in a single vertical line on the left of the chart;  on the initial open of the chart, a plot of the script was a horizontal line at zero, until the script was re-applied to the plot; any changes to the script after it was plotted on a chart crashed Optuma).

In essence we were able to achieve a mathematical representation of a trend line using the recursive method, but it seems that recursion can be a fairly dangerous technique in Optima scripts. I’m not skilled enough to take the recursion concept any further for other calculations but thank you for the suggestion – at a fundamental level, it worked.

Cheers, Dean

Pin It on Pinterest