TradestoryTradeStory Website↗️

No results

Help CenterStoriesStory ItemsSet Strategy Variable

Set Strategy Variable

Last updated February 10, 2024

See Strategy Variables for more information on Strategy Variables.  Strategy Variables are pieces of information that your stories can set and refer to in their executions.

This story item lets your story set the value of a Strategy Variable.

Firstly you must provide the VARIABLE NAME of your variable, by clicking on the Variable Name title.

You can enter the name of your variable that you are saving a value to.  If the variable does not exist, TradeStory creates it for you.  If the variable already exists, the value will be updated to the value you provide.

The VALUE section accepts any Data Item, which can access any data source (like account balance) or just plain value you set in your story.

Strategy: Optional - by default when setting a variable, TradeStory assumes you are setting a variable on the same strategy as the Story.  If you wish to interact with variables on other Strategies, then you can click on the green ‘plus’ icon in the STRATEGY section to select the strategy.

Example: You might wish to make a Schedule that runs a story to set a daily_starting_balance at the start of each day (on a schedule) and saves it to the Strategy Variable starting_balance so that other stories can refer to it when calculating trading size or risk against current balance.

Was this article helpful?