Tutorial177_consolidator | Recognizing periods of consolidation
Consolidation describes a period in time when a stock or security is not in or reversing a larger price trend. During consolidation the instrument typically trades within a limited price range. Tutorial 177 is a TradeStation EasyLanguage tutorial that attempts to recognize periods of consolidation by calculating:
1) The standard deviation of price.
2) The ‘Consolidation Index’ by taking the average of true high over a number of bars, subtracting the average of the true low and dividing the result by the Average True Range.
The tutorial program then looks for when these values go below a user input percentile.
When a period of possible consolidation is found, tutorial 177 draws a box around it with the high of the box being the highest close of the price in the box and the low being the lowest low close of price in the box.
Because periods of consolidation are sometimes associated with low volume the tutorial also changes the color of the boxes when volume is below the average volume. The colors are also determined by user inputs.
This tutorial illustrates various programming techniques, including:
- Drawing rectangle and text drawing objects using BNPoints and XYPoints to specify their size and/or position
- Creating methods to draw rectangles and calling the methods
- Extending rectangles as new price bars form
- Modifying drawing object colors and transparency
- Using intrabarpersist booleans to detect when a percentile has been crossed
See https://markplex.com/free-tutorials/_tutorial177_consolidator-recognizing-periods-of-consolidation/
3
views
Quick-tip 69 | Why text objects can appear differently in a strategy
A Gold Pass member sent a short program that was designed to update the value of and reposition a test string on the last bar of the chart. The code worked fine when included in an indicator but seemed to have problems when copied into a strategy. Quick-tip 69 explains what was happening and how it can be 'corrected.'
See https://markplex.com/free-tutorials/tradestation-easylanguage-quicktips/quick-tip-69-why-text-objects-can-appear-different-in-a-strategy/
5
views
Quick-tip 68 | Part 2 | Identifying and printing order information
In the second video two slightly modified versions of the program are applied to the chart. Information about both trades are displayed by using the order indexes. The video also shows how to get order information using a specific order identification code.
https://markplex.com/quick-tip-68-identifying-what-order-was-filled/
11
views
Quicktip 68 | Identifying what order was filled
A Gold Pass (https://markplex.com/markplex-members...) member asked for help with identifying what order was filled and asked: “Is there a way to identify the name of the last order filled?”
_Quicktip68 demonstrates how to create a simple order ticket and bracket order ticket. The order ticket is sent if current bar close is less than open. Target and stop order tickets are placed a number of ticks away from the average entry price. This program is based on tutorial 169.
When the order ticket is filled an order update event updates the bracket order using the average filled price for the order ticket. It then sends the bracket order ticket. It also prints information about the order.
The quick tip also use an OrdersProvider and its update event to print information when an order is filled.
THIS INDICATOR IS A SIMPLE DEMONSTRATION. ONLY USE ON YOUR SIMULATED ACCOUNTS.
See https://markplex.com/quick-tip-68-identifying-what-order-was-filled/
6
views
Quick-tip 67 | Change alpha value of a color in TradeStation EasyLanguage
QuickTip67 is a TradeStation EasyLanguage indicator that demonstrates how to change the alpha value of a color input as a string. The EasyLanguage indicator draws a rectangle when it is first applied to the chart. It colors the fill (using the string input: Col). The alpha value is changed based on the integer input: Alpha. The color of the rectangle itself (the outline) is colored based on the same color input (using the string input: Col) except it is fully opaque.
This technique was used in Tutorial 176: https://markplex.com/free-tutorials/tutorial-176-blend-bar-study/
and in Tutorial 156: https://markplex.com/free-tutorials/tutorial-156-import-data-in-csv-file-and-draw-it-on-a-chart/
Go to the quick-tip page here: https://markplex.com/free-tutorials/tradestation-easylanguage-quicktips/quick-tip-67-alpha-value-of-a-color-input/
15
views
TradeStation EasyLanguage tutorial 176 | 'Blend bars'
_Tutorial176-BlendBar 'merges' the open, high and low for a user input number of bars to create a 'blended bar.' For example, if the user input BlendNum were set to 3 the the high of the 'blend bar' would be the highest high of the current bar and the two before it. The low would be the lowest low, the open would be the 3 bars ago and the close, the close of the current bar.
This tutorial demonstrates two ways that the 'blend bars' can be included on the chart:
1. using a paintbar and
2. drawing the bars. With the second option the bars are drawn using the trendline objects.
This tutorial illustrates various programming techniques, including:
Using trendline drawing objects
Using a text string text string to create a color object
Changing the transparency of a color object
Managing the number of drawing objects on the chart
See https://markplex.com/free-tutorials/tutorial-176-blend-bar-study/
To join the Markplex email newsletter, go to https://markplex.com/news
2
views
Create a Trading App to display an RSS feed | Tutorial 175
Tutorial 175 demonstrates how to create a simple trading app using TradeStation EasyLanguage to display an RSS feed. The tutorial mostly uses the EasyLanguage Toolbox to create the program together with some additional EasyLanguage.
In tutorial 175 I create a form that contains a DataGrid object and a WebBrowser object. The DataGrid contains three columns which display data from an RSS Feed object:
- a text column that contains the title of the feed item
- a datetime column that displays the publication date (this column is automatically sorted by date)
- a column that contains a clickable URI
When the link is clicked it opens in a Web browser.
See https://markplex.com/free-tutorials/tutorial-175-simple-trading-application-display-rss-feed/
6
views
Quick-tip 66 | Why the values from a study on my Radarscreen are different from those on a chart?
Quick-tip 66 explains why sometimes studies applied to RadarScreen can give different values from the same study applied to a chart with the same settings, and vice-versa and how to avoid this.
To demonstrate quick-tip 66 uses an exponential moving average (EMA) and a simple moving average applied to both chart and Radarscreen.
See https://markplex.com/quick-tip-66-why-the-values-from-a-study-on-my-radarscreen-are-different-from-those-on-a-chart/
1
view
TradeStation EasyLanguage | Quick-tip 63 | Namespace explanation
Namespaces are a grouping of classes that relate to one another. Examples of namespaces in the EasyLanguage class library include:
tsdata.marketdata
Contains classes that are used to access market data such as price quotes, market levels, and fundamental values.
elsystem.drawing
Contains classes that are used to describe the color and font characteristics of form controls and drawing objects.
elsystem.drawingobjects
Contains classes that are used to create and manipulate drawing tools (trendlines, text, rectangles, etc.) in a chart window.
elsystem.office.excel
Contains base classes that are used to access data from Excel spreadsheet files.
Why Use Namespaces?
Name spaces are included in a program with the using key word.
By including namespaces means that classes, methods, properties, and events can be referenced without including the namespace.name as a qualifier.
See https://markplex.com/free-tutorials/tradestation-easylanguage-quicktips/quick-tip-63-namespace-explanation/
56
views
Quick-tip 64 | Global dictionary example | Radarcreen to chart (real-time)
Quick-tip 64 demonstrates the use of the Global Dictionary. In this tutorial the values of two moving averages from two rows in RadarScreen are stored in a GlobalDictionary using a sender program (_Quick-tip64-Send) and then they are read by a receiver program (_Quick-tip64-Receive) in real time. The sender program is applied twice to Radarscreen with different lengths.
The values are read from the Global Dictionary using another program (_Quick-tip64-Receive) and plotted on the receiving chart.
The syntax for creating a global dictionary varies depending on how the global dictionary will be used. To share values beyond the same window type (e.g. between a chart and RadarScreen) OR between two charts when multi-core charting is enabled.
myGD = GlobalDictionary.create( True, "share_name" );
The Share parameter value of TRUE or FALSE controls whether interprocess sharing is enabled or disabled
See https://markplex.com/free-tutorials/tradestation-easylanguage-quicktips/quick-tip-64-global-dictionary-example-radarcreen-to-chart-real-time/
43
views
TradeStation EasyLanguage quick-tip 65 | Number of bars after cross
Quick-tip 65 demonstrates two simple of ways of finding and showing when a condition on the chart has occurred within a user input number of bars.
The quick-tip shows two ways that this can be programmed. The condition used to facilitate the demonstration is the cross of a fast moving average over a slow moving average.
Using a counter
This first technique is used in the TradeStation indicator: _Quick-tip65-Counter. In this program a counter indicator is incremented by one every bar. When the fast moving average crosses over a slow moving average the counter is reset to zero. The program draws an asterisk when the value of the counter is less than a user input value, i.e. when the cross had occurred less that that number of bars ago.
Setting a variable
In the second technique (_Quick-tip65-Condition) a variable is set to a value of 1 every time the fast moving average crosses over a slow moving average, otherwise is is set to zero. The summation function is used to check whether the sum of this variable over the user input number of bars is greater than zero. If so an asterisk is drawn on the chart.
In this example, the asterisks are displayed vertically.
See https://markplex.com/free-tutorials/tradestation-easylanguage-quicktips/quick-tip-65-number-of-bars-after-cross/
38
views
Tutorial 174 | Markplex Centered Moving Average
Tutorial 174 demonstrates how to write Markplex’s version of the Centered Moving Average (C) using TradeStation EasyLanguage. A centered moving average is placed at the center of the range rather than the end of it. This positions the moving average values at their central positions in time and is easy to accomplish by using EasyLanguage’s displace capability.
A disadvantage of the C 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, by definition.
This tutorial demonstrates one approach to estimating the average for the last bars by replacing “missing” bars with the Close of the last bar and then re-calculating and re-plotting the last few bars whenever the close is updated.
https://markplex.com/free-tutorials/tutorial-174-markplex-centered-moving-average/
18
views
Tutorial 173 | Markplex Tradestation EasyLanguage SuperTrend
Tutorial 173 | SuperTrend indicator is a stop and reverse (SAR) indicator that trails price action. This implementation calculates the Average True Range (ATR) of the average price using the exponential moving average. A user input multiple of the ATR is added to or subtracted from the average price to give Upper and Lwr respectively, depending on the direction. Direction is determined by the Close of a bar relative to the value of the SuperTrend.
When the direction is up (Dir = 1), the SupTrend value can only increase. When the direction is down, the SupTrend can only decrease.
There are many different interpretations of the so-called SuperTrend indicator. In this Markplex version the SuperTrend value is also tightened (i.e. moved closer to price) by using an acceleration factor which increases incrementally each bar by user input: AFStep up to a a maximum value of user input: MaxAF.
The indicator works best in trending markets but gets 'whipsawed' in other markets.
See https://markplex.com/free-tutorials/tutorial-173-markplex-supertrend/
12
views
EasyLanguage tutorial 172 | Missing bar correlation using a PSP
See https://markplex.com/free-tutorials/tutorial-172-missing-bar-correlation-using-a-psp/
TradeStation EasyLanguage Tutorial 171 (https://markplex.com/free-tutorials/tutorial-171-correlation-indicator-when-bars-missing/) demonstrated how to create a correlation indicator for data pairs where one of the data pairs has ‘missing bars.’ For example, for symbol 1 (data1) trading might have occurred on every bar during the trading session. Symbol 2 might be more thinly traded and hence it doesn’t have trading activity on every bar.
Tutorial 172 modifies the tutorial 171 program so that instead of using Data2, the equivalent data is taken from a Price Series Provider.
37
views
TradeStation tutorial 171 | Correlation indicator for when bars ‘missing’ in a data stream
Tutorial 171 for TradeStation EasyLanguage, demonstrates how to create a correlation indicator for data pairs where one of the data pairs has ‘missing bars.’ For example, for symbol 1 (data1) trading might have occurred on every bar during the trading session. Symbol 2 might be more thinly traded and hence it doesn’t have trading activity on every bar.
See https://markplex.com/free-tutorials/tutorial-171-correlation-indicator-when-bars-missing/
Join Gold Pass: https://markplex.com/markplex-membership/
3
views
Quick-tip 61 | Change text object when close greater than close of the previous bar
_Quick-tip 61 is a TradeStation EasyLanguage tutorial for TradeStation 10.
The object of Quick-tip 61 is to draw some text on the chart when the close of a bar is greater than the close of the previous bar. When the close is less than or equal to the close of the previous bar no text should be drawn.
When the ‘problem code’ below was used, the text was permanently displayed on the chart, irrespective of whether the closing price was greater than the close of the previous bar or not.
In fact, the ‘problem code’ was redrawing the text every tick where the current close was greater than the close of the previous bar. The print log displays the count of the text objects drawn.
The modified code creates and draws the text object once using a once statement. For every tick following the text string is modified depending on whether close is greater than the close of the previous bar.
https://markplex.com/free-tutorials/tradestation-easylanguage-quicktips/quick-tip-61-change-text-object-when-close-greater-than-close-of-the-previous-bar/
8
views
Tutorial 170 | Looking for a chart pattern on several symbols using PSPs
Tutorial 170 demonstrates how multiple symbols can be loaded on a chart by using several price series providers (PSPs) to test for a specific condition (in this example a simple hammer pattern).
With tutorial 170 a list of stocks is stored in a text file stored on the local computer. This file is read into the program using the StreamReader and the names of the stocks stored in a TokenList after having been checked by another method that they are a valid symbol. Once the data has been downloaded a loop creates a PSP for each symbol in turn. The PSPs are stored in a vector. Update and state changed events are also created for each PSP.
Tutorial 170 monitors the state changed and update events for each PSP. When the PSP is first loaded and when each PSP closes, it performs a calculation to see if a simple candlestick pattern has occurred.
See https://markplex.com/tutorial-170-looking-for-a-chart-pattern-on-several-symbols-using-psps/ for full details.
23
views
Quicktip 59 | Daily hammer on intraday chart
Quicktip 59 is designed to be applied to intraday charts. It calculates whether the currently forming daily bar (or completed daily bars) is a hammer or inverse hammer pattern in its current state of development (i.e. if you took a snapshot of the daily bar (so far) is it a hammer or inverse hammer pattern?
The quick tip is based on program 54 which is a strategy that uses hammer and inverse hammer patterns in its algorithm.
Quick tip 59 uses the OpenD( 0 ), HighD( 0 ), and LowD( 0 ) functions which provide the open, high and low of the current day.
This quick tip also gives an example of the use of the _Quicktip59_FN function. The function returns -1 for an inverse hammer pattern and returns + 1 for a hammer pattern.
See https://markplex.com/free-tutorials/tradestation-easylanguage-quicktips/quicktip-59-daily-hammer-on-intraday-chart/
10
views
Tutorial 169 | Order ticket and bracket ticket for TradeStation EasyLanguage
Tutorial 169 demonstrates how to create a simple order ticket which is sent when the close of the bar is less than the open of the bar. When the initial order ticket is filled the program then issues a bracket order ticket that includes a target and stop. In order to send the bracket order the program uses an update event for the order generated from the order ticket.
In the simple scenario demonstrated in this tutorial, when the order ticket is filled the order update event updates the bracket order using the average filled price for the order ticket. It then sends the bracket order ticket. For the order placement objects to work the ‘enable order placement objects’ must be selected in the format indicator’s general tab.
If the tutorial program is reapplied to a chart or the chart refreshed, it will resend the order tickets. Use on your simulated account.
This tutorial only applies to TradeStation.
https://markplex.com/free-tutorials/tutorial-169-order-ticket-and-bracket-ticket/
16
views
Quick-tip 58 | Drawing object tactics
A TradeStation EasyLanguage quick tip that demonstrates:
1. How to keep a text object at a specific position as the chart updates
2. How to draw and delete a rectangle.
3. How to maintain and update a text object on the last bar of a chart
See https://markplex.com/free-tutorials/tradestation-easylanguage-quicktips/quick-tip-58-drawing-object-tactics/
25
views
Quick-tip 57 | Find price where TradeStation chart clicked
_Quick-tip 57 is a TradeStation EasyLanguage tutorial for TradeStation 10 that demonstrates how to see the price level of a click on a chart. This information could, potentially be used by another algorithm (for example, creating an order ticket.) The tutorial uses the ChartElementClick event which is associated with a drawing object. The program also uses the charting host object to detect when the chart is clicked.
The program works by working out the price at the top and bottom of the chart window. It calculates click position in pixels relative to the top and bottom of the chart window and use this data to calculate what price level was clicked.
See https://markplex.com/free-tutorials/tradestation-easylanguage-quicktips/quick-tip-57-find-price-where-chart-clicked/
11
views
Tutorial 168 | Calculating moving averages on RadarScreen for different intervals
_Tutorial168 is designed for RadarScreen using price series providers (PSPs) to calculate the moving average for monthly, weekly, daily and minute bars. The moving averages are compared with the closing price of of the current PSP bar. If the close is higher than the moving average of that interval a variable (Score) is incremented by one. If it is less then the variable is decremented by one.
See the tutorial page here: https://markplex.com/free-tutorials/tutorial-168-calculating-moving-averages-on-radarscreen-for-different-intervals-using-price-series-providers/
3
views