Skip to content

Tutorial 179 | Using AppStorage in the calculation of price change since this tutorial program first applied

Tutorial179-2

TradeStation EasyLanguage Tutorial 179 uses AppStorage to store the price of a symbol when the tutorial program is first applied (and the date when the program was applied.) The program then calculates and plots the percentage difference between the initial value and the current close.

According to the TradeStation help files, AppStorage is “A Dictionary of name-value pairs that will be persistent when an analysis technique is re-verified, has its inputs modified, or re-runs for another reason (such as when it is disabled by the user temporarily, and then enabled again).”

It is an easy-to-use and has, potentially, many applications.

The value of the date and ‘last’ price when first applied are retained even when RadarScreen is refreshed (by pressing CTR-R) or when the workspace is saved, closed and later re-opened.

If the user wanted to re-store all the initial values then the program should be deleted from Radarscreen and re-applied.

For more information about AppStorage see: Tutorial 119

For an explanation of ‘Load Additional Data for Accumulative Calculations’ and MaxBarsBack in RadarScreen see: Tutorial 25.

The tutorial uses a TokenList to process a comma delimited string. TokenLists make it very easy to refer to individual elements of the comma delimited string.

The tutorial actually demonstrates two programs. In the first the Last keyword is used to refer to the stock price when the program is first applied to RadarScreen. In the second version, Close is used.

Tutorial179-1

Free Gold Pass download

If you are a Gold Pass member you can download the tutorial 179 programs below for free. (Make sure that you are logged into Gold Pass): This content is for members only.

Video showing the development of the tutorial 179 program

Technical lessons

  • Storing data in AppStorage
  • Using TokenList functionality to parse a comma delimited list

TO THE BEST OF MARKPLEX CORPORATION’S KNOWLEDGE, ALL OF THE INFORMATION ON THIS PAGE IS CORRECT, AND IT IS PROVIDED IN THE HOPE THAT IT WILL BE USEFUL. HOWEVER, MARKPLEX CORPORATION ASSUMES NO LIABILITY FOR ANY DAMAGES, DIRECT OR OTHERWISE, RESULTING FROM THE USE OF THIS INFORMATION AND/OR PROGRAM(S) DESCRIBED, AND NO WARRANTY IS MADE REGARDING ITS ACCURACY OR COMPLETENESS. USE OF THIS INFORMATION AND/OR PROGRAMS DESCRIBED IS AT YOUR OWN RISK.

ANY EASYLANGUAGE OR POWERLANGUAGE TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS (AND PARTS THEREOF) AND ASSOCIATED TECHNIQUES REFERRED TO, INCLUDED IN OR ATTACHED TO THIS TUTORIAL OR PROGRAM DESCRIPTION ARE EXAMPLES ONLY, AND HAVE BEEN INCLUDED SOLELY FOR EDUCATIONAL PURPOSES. MARKPLEX CORPORATION. DOES NOT RECOMMEND THAT YOU USE ANY SUCH TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS (OR ANY PARTS THEREOF) OR TECHNIQUES. THE USE OF ANY SUCH TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS AND TECHNIQUES DOES NOT GUARANTEE THAT YOU WILL MAKE PROFITS, INCREASE PROFITS, OR MINIMIZE LOSSES.