Parameters

Setting parameters in creator

Overview

After every settings page a parameter page will follow. Parameters page will always contain a parameter table where you can add the extra data that will be passed into the function along with adding setup functions. Along with this, dependant on what type of item the parameters are for, there will be extra settings like flatten and period.


  1. Period / Single Shot Controls - Set how often the item should run or set single shot, run only once. If single shot is selected, the value in the period time edit is ignored. This is only available for script / data source items. Actions are run based on new data being brought in.
  2. Flatten - Flatten the data being outputted by this item. See the Flatten section for details.
  3. Parameter Suggestions - The parameters that are being passed into the functions in this item and need to be set. These are almost always correct, the names in the parameter table must match exactly.
  4. Parameter Table - Where the parameters and functions are set. See the respective section/page for more information.

Flatten

Flattening is an advanced option for getting rid of a data structure your code isn't supposed to use. If you run your algo and look at the output and see data that looks like this:

"Times",                    "Price"
[2:00,2:01,2:02,2:03,2:05], [130,131,130,129,127]

But what you expected looks more like this:
"Times", "Price"
 2:00,     130
 2:01,     131
 2:02,     130
 2:03,     129
 2:05,     127

If an action relies on times and prices and doesn't expect the data in the list format [], it will throw an error. If you find an action giving an error in the logging window and complaining about lists, then flatten might fix it for you.
Another issue this affects is how often actions will run. Since actions are run based on the data that's avaialble, the data in the first example will only count as 1 data point while in the second it's 5 separate data points. If you know you are getting data but your actions down the line aren't running then it might need flatten enabled.
Flatten is commonly needed when the AI produces code that gathers multiple data points in one go. Like getting all the comments off a social media post, but you want an action later to do its function on individual comments instead of all the comments at once.

Parameters

TODO