Tutorial 202 | Calculate price to reach a user input RSI value
Tutorial 202 seeks to look at the RSI calculation and calculate what price (this bar) needs to be for the RSI to reach (or go down to) a specific value.
To achieve this the calculations the RSI calculations are solved for Price (i.e. price this bar). Because the above formula includes AbsValue, we actually solve for two eventualities (i.e when price is greater than price last bar and when price last bar is greater than price this bar).
See https://markplex.com/free-tutorials/tutorial-202-calculate-price-to-reach-a-user-input-rsi-value/
4
views
Tutorial 201 | Annotated trend line drawing tool
In tutorial 201 trendlines drawn on the chart are are analyzed and text is added to the chart, associated with the trendline. The contents of the text can include, either points value, dollar value, ATR multiple (before the trendline), number of bars or a combination of all this information depending on the setting of a user input: ShowValue.
The ATR value being shown is actually the multiples of ATR (calculated before the move) for the move, not the ATR value.
If the chart is refreshed the program recalculates the values based on the trendline objects that remain on the chart. This also occurs if MaxBarsBack is set to auto-detect. In this case, when a drawing object is added earlier on the chart to the current drawing objects, the chart recalculates.
If the lines are moved or either of the start or end positions are changed, the text label is updated.
The free download is available here: https://markplex.com/free-tutorials/tutorial-201-trend-line-drawing-tool/
Remember to subscribe to the Markplex email list at https://markplex.com
Quick-tip 89 | Importing a text file into ELCollections
Collections for EasyLanguage is a versatile and powerful programming feature that allows TradeStation EasyLanguage to manage and manipulate groups of data efficiently.
_Quick-tip 89 explains how to import a comma delimited text file into an ELCollections collection of lists. In this example the lists include list of numbers and lists of strings. The quick-tip also demonstrates ways of accessing the data once the text file has been imported.
See https://markplex.com/free-tutorials/tradestation-easylanguage-quicktips/quick-tip-89-importing-a-text-file-into-elcollections/
2
views
Tutorial 197 | Storing bar and analysis technique data in Excel
A Gold Pass member asked how to create an Excel spreadsheet with n rows and m columns, the n rows representing each of the successive bars on an intraday chart, and for each of the n rows a column for each of the m different indicator values that appear on that bar. In tutorial 197 the following data is stored for each successive bar: a bar counter, date , time, close, open, high, low, the value of the calculated CCI, the values of the calculated RSI and the average of the closing price. The values for the most recent bar are updated in real time.
When the program is restarted it reopens and rewrites the data.
The tutorial also touched upon the use of the Microsoft Excel "Conditional Formatting" feature.
Other Excel integration tutorials include:
Tutorial 150 | Sharing data between two charts using Microsoft Excel
Tutorial 113 | Using data from an Excel sheet to update an EasyLanguage program
Tutorial 112 | Transfer price data from a Price Series Provider applied to a chart to an Excel spreadsheet
Tutorial 96 | Using the Workbook component to share information with Excel
14
views
EasyLanguage Tutorial 196 | Scope in methods (plus convert a function to a method) | Part 2
Tutorial 196 gives an example of “scope” in the context of a method.
A common guideline in good programming practice suggests that a method should ideally only utilize variables that are provided through its parameter list or those that are locally declared within the method itself. However, there are situations where adhering strictly to this principle might be overly cumbersome or impractical. In such cases, it becomes possible to reference variables that have been declared at a the EasyLanguage study level.
Both “types” of methods are demonstrated in this tutorial.
When a variable is declared within the primary section of a study, it can be directly accessed and modified throughout that study. Nevertheless, when a method is invoked, it operates within its designated scope by design. This means that a variable declared within a method is confined to that method’s scope. Even if a variable with an identical name exists elsewhere, it is treated as a distinct and separate entity, maintaining its own distinct scope within the method.
To demonstrate converting the functions to methods two functions are used:
XAverage (a series function), and
Average( a simple function)
See https://markplex.com/free-tutorials/tutorial-196-scope-in-methods-plus-convert-a-function-to-a-method/
EasyLanguage Tutorial 196 | Scope in methods (plus convert a function to a method) | Part 1
Tutorial 196 gives an example of “scope” in the context of a method.
A common guideline in good programming practice suggests that a method should ideally only utilize variables that are provided through its parameter list or those that are locally declared within the method itself. However, there are situations where adhering strictly to this principle might be overly cumbersome or impractical. In such cases, it becomes possible to reference variables that have been declared at a the EasyLanguage study level.
Both “types” of methods are demonstrated in this tutorial.
When a variable is declared within the primary section of a study, it can be directly accessed and modified throughout that study. Nevertheless, when a method is invoked, it operates within its designated scope by design. This means that a variable declared within a method is confined to that method’s scope. Even if a variable with an identical name exists elsewhere, it is treated as a distinct and separate entity, maintaining its own distinct scope within the method.
To demonstrate converting the functions to methods two functions are used:
XAverage (a series function), and
Average( a simple function)
See https://markplex.com/free-tutorials/tutorial-196-scope-in-methods-plus-convert-a-function-to-a-method/
3
views
Tutorial 195 | Storing data in multiple new CSV files created by the program
There are many reasons why you might want a TradeStation EasyLanguage program to print data to an external file on your computer.
Tutorial 195 demonstrates how a program can create multiple files on a local computer and store data in each of them.
In this example program, applied to a 1 minute chart, exponential moving averages are calculated and then written to a CSV (Comma Separated Value) file. Every time a new hour begins, a new file is created. The files are named using a combination of the symbol name, the bar interval, the date and the hour, for example: “T195_@ES_1_07-16-23_19.csv.”
The files are created and the data stored using StreamWriter functionality and the data is available to be analyzed in a spreadsheet program.
https://markplex.com/free-tutorials/tutorial-195-storing-data-in-new-files-created-by-the-program/
15
views
Quick-tip 88 | DateTime behavior | TradeStation EasyLanguage tutorials and programs
Quick-tip 88 demonstrates a behavior of the TradeStation DateTime object. In particular it looks at how you could save the temporary value of a DateTime object into another DateTime object using the Value property.
See https://markplex.com/free-tutorials/tradestation-easylanguage-quicktips/quick-tip-88-save-a-datetime-object-into-another-datetime-object/
19
views
Tutorial 194 | Drawing vertical lines to left and right of a clicked bar
A Gold Pass Member asked how he would go about drawing vertical lines, 26 bars left and 26 bars right from a bar chosen by a mouse click.
Such an analysis technique needs three elements:
1) To be able to detect when a bar is clicked on the chart
2) To clear vertical lines drawn when a previous bar was clicked
3) To create and draw vertical line drawing objects
In this tutorial, rather than hard-coding the number of bars before and after the bar clicked, the number is determined by a user input (Gap) as are the weight and thickness of the vertical lines.
The colors of the lines are hard-coded but could easily be changed (see the tutorial video).
Technical lessons include:
Using the ChartingHost class to determine when a bar is clicked
Creating BNPoints for the bars where we draw Vertical lines
Clearing and adding VerticalLines to the chart
Modifying the weight and style of the vertical lines
See: https://markplex.com/free-tutorials/tutorial-194-drawing-vertical-lines-to-left-and-right-of-a-clicked-bar/
7
views
Program 86 | Recurring Volume Profile for a User Specified Time Period
See: https://markplex.com/easylanguage-programs/program-86-recurring-volume-profile-for-a-user-specified-time-period/
Program 86 uses thePrice Series Providerclass to create a volume profile for specified periods during the day. The length of this period is determined by a user input:RepeatTime. When this time elapses the volume profile is calculated and drawn. Data collection then starts for the next recurring period. This is repeated throughout the day. The profile is color coded between two user specified colors:HistColor1andHistColor2.
Having calculated the volume profile, Program 86 then calculates at which price level most volume occurred during the period being analyzed.
It also plots three horizontal lines at the following levels:
The price high of the period being analyzed
The price low of the period being analyzed
The price at which the highest volume occurred during the PREVIOUS period analyzed
Program 86 was designed and tested with TradeStation 10. It works on intraday minute bars.
The RepeatTime input determines both the time period over which the analysis takes place and when the analysis is repeated. For example, if 5 minute bars were used and the StartTime set to 1000, and RepeatTime set to 60 then the initial period analyzed would be the first tick after 1000 to 1100. The analysis would then be automatically repeated for the first tick after 1100 to 1200,first tick after1200 to 1300 etc.
This program will not work in MultiCharts because it uses the TradeStation collections and other functionality that is not available in the MultiCharts environment.
2
views
Tutorial 193 | Activity Bars | TradeStation EasyLanguage tutorials and programs
Tutorial 193 takes another look at TradeStation ActivityBars (see also Markplex tutorial 133: https://markplex.com/free-tutorials/tutorial-133-displaying-trade-at-bid-and-ask-data-using-activitybars/.)
Activity bars allow the user to analyze a bar ("activity bar") smaller than the current bar. In this tutorial the 'big' bars are set to daily, with the analysis being made on one minute bars ("activity bars").
Specifically the tutorial analyzes the Commodity Channel Index (CCI) effectively applied to the smaller interval (one minute bars) and looks for "zero rejections" i.e. the CCI get close (or slightly crosses the zero line, depending on the inputs we use, but then moves back in the same directions it came from.
Tutorial 193 also looks for divergence between price and the CCI.
In either case, if an incidence of a zero rejection or a potential divergence occurs, an activity bars is drawn for the price range in which it occurred.
The tutorial includes two methods:
LegacyColorFromColObject: takes the name of a color and converts it into an integer which can be used in the AB_AddCellRange statement.
NewBar: this method is called for each activity bar. Most of the functionality is concerned with looking for divergences and zero rejections. If found AB_AddCellRange adds an activity bar. The method includes functionality to get a label value from a string. It also get the color value from a TokenList containing specific names of colors from the Color class.
See the tutorial page: https://markplex.com/free-tutorials/tutorial-193-activitybar-study-showing-cci-zero-rejection-and-divergence/
6
views
Quick-tip 86 | Basic TradeStation RadarScreen screener | EasyLanguage tutorials and programs
Quick-tip 86 demonstrates a simple indicator for TradeStation Radarscreen that has 3 columns: 3 input columns and one column that displays “buy” or “sell” depending on the price of the last trade.
The user inputs a “top” price, a “bottom” price and an adjustment amount (input: Near).
A further column displays "BUY" or "SELL" depending on the last price and the user inputs.
3
views
Tutorial 192 | Anchored VWAP (estimated)
Tutorial 192 demonstrates how to create an Anchored Volume Weighted Average Price (estimated) indicator.
The Volume Weighted Average Price or VWAP is calculated by summing the volume multiplied by price, summing the volume and then dividing the former by the latter. This is an estimated value because the calculation is assuming that all the volume occurs at the ‘price’, by default this is set to the average price for the bar. The ‘anchored’ means that the line is calculated from the bar that was clicked (compared to being calculated from the beginning of the day, or the start of a new session).
The tutorial program can be downloaded for free by Gold Pass members at the tutorial page (make sure you are logged in):
https://markplex.com/free-tutorials/tutorial-192-anchored-vwap-estimated/
If you are interested in Gold Pass visit: https://markplex.com/markplex-membership/ for the details.
5
views
Tutorial 191 | Information panel based on daily data
Tutorial 191 demonstrates how to create a program to display a panel of information about another symbol.
https://markplex.com/free-tutorials/tutorial-191-information-panel-based-on-daily-data/
The information displayed includes the symbol name, closing price, daily volume and the Relative Strength Index (RSI) calculated using daily data from a Price Series Provider (PSP). In the example shown above, the indicator is applied 5 times as part of a ‘study group.’
The program uses the PSP to provide the data for a symbol different from the charted symbol. The tutorial also demonstrates a way of calculating the RSI value using this PSP data.
Technical Lessons
Technically, the tutorial program 91 is based around a price series provider (PSP). Because we are interested in daily information about a symbol, the PSP is the simplest way of achieving this. The PSP and an associated event were originally created using the toolbox and then the code copied from the ‘designer generated code.’ The calculation is similar to the standard RSI function, however care needs to be taken about the calculation that occurs at the end of each PSP bar.
The tutorial program also demonstrates how to create a label using 'Composite Formatting' and how to keep it stationary relative to the chart frame.
3
views
Quick-tip 85 | Average daily volume on non daily bar type
I was asked how to show a daily average on a non daily interval for RadarScreen. For example, you might have a 5 minute bar interval but you want to show the average of volume for the last 5 days.
This quick-tip demonstrates how this can be achieved using the TradeStation price series provider.
See the quick tip page here: https://markplex.com/free-tutorials/tradestation-easylanguage-quicktips/quick-tip-85-average-daily-volume-on-non-daily-bar-type/
Gold Pass members can download the program for free on the quick-tip page (above).
1
view
Quick-tip 84 | Setting default inputs
In quick-tip 84 I discuss setting default inputs.
It is important to know that for a program applied to a chart, the inputs in the code of the program and those being used by the program at the moment (the ‘applied inputs’ ) are not necessarily the same. For example, if you apply a strategy and then optimize it, the applied inputs are likely to change from the default inputs in the program.
https://markplex.com/free-tutorials/tradestation-easylanguage-quicktips/quick-tip-84-changing-default-inputs/
4
views
Tutorial 190 | Markplex Centered Moving Average Envelope | EasyLanguage tutorials and programs
Tutorial 190 (based on tutorial 174) demonstrates how to write Markplex’s version of the Centered Moving Average (CMA) Envelope using TradeStation EasyLanguage. A centered moving average is placed at the center of the time period it is averaging rather than the end of it. This positions the moving average values at their central positions in time.
A disadvantage of the CMA is that because the values are displaced there are a number of bars at the end of the chart where there are not a sufficient number of future bars to calculate the average.
This tutorial demonstrates one approach to estimating the average for the last bars by replacing “missing” bars with the price of the last bar and then re-calculating and re-plotting the last few bars whenever the close is updated. The earliest bar of the estimate remains on the chart after a new bar develops.
See the tutorial page for more information and downloads: https://markplex.com/free-tutorials/tutorial-190-markplex-centered-moving-average-envelope/
6
views
Tutorial 189 | Find most recent bar with low greater than current high
Tutorial 189 takes the high of the last completed bar and searches back in time for the most recent bar where the low of that bar is greater than the high of the last completed bar.
The bar that meets this criteria is then plotted over using PlotPB or alternatively is highlighted by drawing trendlines between its high and low and open and close.
https://markplex.com/free-tutorials/tutorial-189-find-most-recent-bar-with-low-greater-than-current-high/
9
views
EasyLanguage quick-tip 82 | 'selecting' bars using a drawing tool
TradeStation EasyLanguage Quick-tip 82 uses a paint bar study to detect when the user has drawn a rectangle on the chart to 'select' bars. It plots the consecutive bars indicated by the rectangle and calculates the high and low values of the range. These values are added to the chart as text objects.
The quick-tip uses the same technique used in tutorial 188 to select bars. This quick-tip does not do the volume analysis.
See https://markplex.com/free-tutorials/tradestation-easylanguage-quicktips/quick-tip-82-selecting-bars-using-a-paintbar-study/
19
views
TradeStation EasyLanguage quick-tip 81
TradeStation EasyLanguage Quick-tip 81 shows how to find and plot the high and low of the last three 5 minute bars, every three bars. The quick-tip also mentions the need to adjust the number of 5 minute bars if you want to have it lining up with 15 minute bars.
https://markplex.com/free-tutorials/tradestation-easylanguage-quicktips/quick-tip-81-find-and-plot-the-high-low-of-last-3-5-minute-bars/
9
views
TradeStation EasyLanguage quick-tip 80 | How to change a color 'hard-coded' in a program
EasyLanguage legacy color reserved words: Black, Blue, Cyan, Green, Magenta, Red, Yellow, White, DarkBlue, DarkCyan, DarkGreen, DarkMagenta, DarkRed, DarkBrown, DarkGray, LightGray,
You might also be interested in QuickTip 33 which demonstrates a method to allow the use of colors from the color class in the Plot statement.
https://markplex.com/free-tutorials/tradestation-easylanguage-quicktips/quick-tip-80-how-to-change-a-color-hard-coded-in-a-program/
7
views
EasyLanguage Quick-tip 79 | How to use tutorial 114 to draw stochastic zones
TradeStation EasyLanguage Quick-tip 79 shows how to set up a chart using the tutorial 114 program to create colored bands on a standard stochastics indicator.
See https://markplex.com/free-tutorials/tradestation-easylanguage-quicktips/quick-tip-79-how-to-use-tutorial-114-to-draw-stochastic-zones/
3
views
TradeStation EasyLanguage tutorial 188 | Volume profile for user selected bars
Tutorial 188 is a new TradeStation EasyLanguage tutorial from Markplex that demonstrates how to select a number of bars using the drawing tool. It then paints the bars selected and analyzes and draws the volume profile.
https://markplex.com/free-tutorials/tutorial-188-volume-profile-for-user-selected-bars/
7
views
TradeStation EasyLanguage Tutorial 187 | Draw text labels anchored to the right of the chart
Tutorial 187 for TradeStation EasyLanguage, demonstrates how to create a simple program to create text anchored to the right hand side of the chart at ten specified price levels.
https://markplex.com/free-tutorials/tutorial-187-draw-text-labels-anchored-to-the-right-of-the-chart/
7
views
Quick-Tip 78 | Indicator plot formatting options
Quick-tip 78 demonstrates three different ways of formatting indicator plots.
Using the ‘customize study’ after the indictor has been applied to the chart
With the indicator open in the development environment, right click and select properties
Coding the plot statement
The quick-tip also explains how to make some of the settings the default settings.
3
views