|
|
Chart of the Week – Auction Market Theory Order FlowThis week, we share with you a particularly informative chart that will appeal to anyone studying or learning auction market theory. This chart uses the RTL capabilities of MarketDelta to analyze order flow in the context of value areas. If you are new to auction market theory, we can recommend books by James Dalton, one of a few pioneers in the study of Market Profile. Additionally, click here for a discussion on Market Profile strategies and terminology, or click here to see a PDF that specifically discusses Value Areas. Auction market theory analyzes price movement in and out of value areas, as determined by Market Profile concepts. This price movement, in market ranges that are out of balance, is either “initiative” or “responsive.” Today’s chart uses several RTL signals to annotate what kind of auction behavior is unfolding. Because these are custom signals, the chart will only function in a Professional version of MarketDelta. It is also worth noting that this particular chart will take a few extra seconds to load due to the calculations it contains. In a future article in this blog, we will discuss the RTL techniques used to create this chart. Today, we focus on its features. It is important to note that the style of the chart, its strategy for the annotations and other tweaks provide flexible room for customization when using RTL and can be altered by anyone (click here for tutorials on RTL). This chart currently evaluates auction behavior in the context of the prior day’s value area for the first 90 minutes of the session, when the current day’s developing value area is still unfolding. Then, it switches its analysis to the developing value area, and the annotations distinguish between which method is used at any point in time. Another nifty feature is real-time alerts for range extension above or below the Initial Balance area. Click on each of the images below to see an explanation of all the features on the chart. You can download the chart definition right here: auction analysis. “Initial Balance” Rotation Strategy: Part 4 – Signal Limiting(This is a continuation in our blog series on creating a trading system from start to finish. Want to see more? Click here for our main RTL support page, which links to the articles in this series and many more tutorials. Questions? Click here for the RTL Community Forum where you can get help on your programming.) Today we show a nifty little technique for limiting a signal to just the first marker on a chart.
The problem is obvious: usually, many bars in a row meet the signal conditions, so you end up with a rather inelegant series of overlapping signals that are redundant and not particularly useful. With some short and simple RTL code, you can limit a signal so that it only appears once on a chart. It is important to note that this is only necessary to beautify the visual depiction of a signal, on a chart. This is entirely unnecessary when backtesting. A backtest allows you to specify how many trade entries to take, regardless of how many signals appear. In the above screenshot, the signal is added directly to the chart, which creates all the visual cues you see. To limit a signal so it only displays once, the first step is to remove the signal from the chart entirely. Or, you can start with a chart that does not already have the signal added. To remove a signal, click once on any signal marker on the chart, and this will highlight the signal so you can delete it by pressing the “Delete” key on your keyboard. You can also use the trash can icon on the chart’s toolbar (not the main MarketDelta toolbar). We introduce two new RTL tokens to make this happen: SIGNAL token : This very simple token indicates whether a signal is valid or not; that is, if the signal’s conditions are met. It is sort of a “signal of a signal” and will be clear in the example below. SSTAT token – “Signal Statistics” : This versatile token lets us get information about the signals on a chart, and it has many, many options. In short, we simply need the following information from each token:
With the SIGNAL token, a value of “1″ means the assigned signal to the SIGNAL token is valid and its conditions are met. For the SSTAT token, we also use a value of “1″ to indicate that the total number of triggered signals on the chart is 1; this essentially means that we only take the first signal. Our code will look like this: The settings for SSTAT are: You can access the SSTAT or any token’s settings later by right-clicking on them in the token list on the right of the RTL window. If you right-click on the SIGNAL token, it conveniently opens a new RTL window for that particular signal you are working with. When you save and add this to a chart, using the same signal marker method instructed in our previous article, you will see only 1 marker, the first marker for the signal. Here is a comparison between the raw signal on the chart, and this new code which limits the signal: In this example, I used the “offset” parameter in the signal marker so the green marker did not overlap with the other markers. Without the offset and the extra signals, we just get this: Since last time we showed the full RTL code for the 200% IB High, here is the similar code used in this signal: LO <= ((SESST_LOW – (SESST_HIGH – SESST_LOW))+1) AND TIME >1030 AND TIME < 1500 Note the “+1″ — as we noted last time, this creates the signal within 1 point of the actual 200% IB level, so you can enter the trade slightly ahead of time. Many market reversals occur just before this level, so this prevents the trader from missing the trade altogether. This will be an important part of backtesting, which we start looking at in the next article in this series. “Initial Balance” Rotation Strategy: Part 3 – Signal(This is a continuation in our blog series on creating a trading system from start to finish. Want to see more? Click here for our main RTL support page, which links to the articles in this series and many more tutorials. Questions? Click here for the RTL Community Forum where you can get help on your programming.)
Today we look at creating the actual trading signals based on the 200% Initial Balance rotational strategy previously outlined. In the last segment, we created a custom indicator to display these levels on the chart. Today, we use the same math from the custom indicator to build the signal. The advantage of first creating the indicator is to make sure our math is correct. Added to the chart, this indicator also lets us easily verify that the signal is triggered at the moments we would expect. So if you haven’t already, refer to Part 2 of this series for an explanation of the math involved, and how to setup the RTL tokens to study the 200% IB range. Creating the signal is actually quite straightforward now that we are sure about the tokens and their settings and relationships. Just as we had two indicators for each of the 200% IB High and 200% IB Low, we will also have two separate signals for the “buy at the low” and “sell at the high” entries. Using either the RTL button on your toolbar or the File > New menu, create a New Signal. We know that the 200% IB calculation is going to be the same as in our indicator, so the first thing you can do is copy/paste or type the indicator code into the the new signal window. We will start with the code for the 200% IB High:
Note: Because a signal requires a comparison between values, which this indicator code does not have, you will see an error in the title bar of this window after you press Save. This is because we are not yet done with the algorithm and have yet to turn it into a trading signal. Next, we compare the current price to the level calculated using a “relational operator.” There is some room for variation here, but lets assume, for starters, that we want the signal to indicate a “sell” whenever price reaches the 200% IB High level. We will state that if the highest price of a bar/candle penetrates the 200% IB High, we signal a short entry. This occurs if the High (with RTL token “Hi”) is equal to or greater than this IB level:
Alternately, you can add this to any chart in the same way you would add an indicator. Right-click on a chart and choose Add > Technical Indicator or press the Insert key on your computer keyboard to bring up the same window. Select the Signal Marker indicator and configure it as desired:
Because we have the custom indicator also on our chart (the blue line), we can quickly verify that the signal is indeed triggering in the right places. However, we may wish to reduce the actual number of signals. One way to do this is by editing the signal. To edit the signal quickly, you can double-click on any marker to bring up the marker’s settings. You can then press the Edit button to open the RTL window. If you omit the “>” sign and save the signal, then the chart will only show a marker when a bar’s high exactly equals the 200% IB High level:
This code, without the “>”, is very limiting. It requires that the high of a bar exactly equal the 200% IB High level. There is a more robust way to limit a signal from only displaying once on the chart. This method requires two additional tokens, making the RTL a bit more complicated. We will introduce this technique in the next blog post in this series. For now, I recommend you keep the original relational operator, “>=”, in your code. Adding ConditionsWe now have a signal that accurately displays when a bar passes above the 200% IB High. This is the only condition for the signal, currently. Often, you will want a signal that triggers based on multiple conditions that must be met. We will add two such conditions to our signal based on the time of day. The IB, by definition, is not complete until after the first hour of trading. Any signals that might appear during the first hour are not truly 200% IB signals. So we want a condition that prevents signals at that time. Additionally, many traders don’t want to enter such a rotational trade too late in the day. The idea is that such a price extreme late in the day might continue until the end. Or,there may also not be much time left in the day to see a true rotation and make decent profit. So we will add two conditions: one to limit the signal to times after the first hour, and another to limit it to times before the last hour. In the Eastern time zone, this means the time is after 10:30 am but before 3 pm. Addtional conditions use the “AND” operator. This is easy to do by adding the following code to our signal: AND TIME >1030 AND TIME < 1500 All times for the TIME token are in military format. Adjusting Entry LevelJust because this strategy uses 200% IB levels does not necessarily mean that a trader will always enter exactly at these levels. Some traders like to get in a bit early, as clearly the market often reverses a few ticks away from this level. Other traders may want to wait until the market passes through the level by a few ticks. Whatever the preference, we can add this to our signal. In backtesting, we can determine the best entry point, but for now we will hard-set it into the RTL code. Consider the following variation for our signal: HI >= (SESST_HI + (SESST_HI – SESST_LOW))-1 We have enclosed the prior math into parenthesis, and then subtracted 1 point from this. The signal will now trigger when we get within 1 point of the 200% IB High. You could change this to 0.5 or even add 1 instead of subtracting 1 to change where the signal forms around the 200% IB High level. Later, we will change this to a variable and let MarketDelta tell us what is the best option here. Putting it all togetherHere is our final signal code for the 200% IB High: You would then create the mirror image of this signal in the same way for the 200% IB Low, using the same math as we used in our custom indicator from last time. Chart of the WeekHere is another simple but useful chart showing a candle chart with a volume breakdown indicator set to display the cumulative delta for each day. The blue lines represent the maximum and minimum cumulative delta values achieved for each day and have each been added as additional volume breakdown indicators. So in essence there are 3 VB indicators applied to the lower pane. Below are the preference windows for each VB indicator. Benefit The lower pane was built using the Volume Breakdown Indicator with these settings. Two Good Trade Examples From TodayReaders of this blog will note some interesting charts we have posted in just the last week that provide good insight into the market. Today, the market reversed at two key levels perfectly identified on two charts we discussed in earlier blog postings. One of these reversals is based on the chart of the week from just this last Friday. The other reversal comes from the 200% IB Strategy we demonstrated in our new RTL blog series. Both of these patterns appeared beautifully in the market today, and they help reinforce the value of both Footprint charting as well as Market Profile strategies. Click the image to see a larger version. Chart of the WeekEvery now and then we look to highlight an interesting chart that showcases some of the powerful features within MarketDelta. Here is an example of a Footprint chart set to the Footprint Profile type (any Footprint type could be used) showing the volume point of control (VPOC) as a blue box within each bar and then a blue line denoted as a “naked VPOC”. There were 2 indicators used to create this chart. The Profile indicator to draw the naked POC lines and the Volume Price Statistic to draw a box around the high volume price. A naked VPOC is simply a high volume price that has yet to be re-tested. So the blue line will continue to draw across the chart until that price trades again. Many traders like to “lean” on high volume areas and it is a known fact the market likes to test high volume areas. So one way to use this information would be to look at these lines as support and resistance areas then use the “inside the bar” Footprint information to get in and manage the trade. “Initial Balance” Rotation Strategy: Part 2 – Indicator(This is a continuation in our blog series on creating a trading system from start to finish. Want to see more? Click here for our main RTL support page, which links to the articles in this series and many more tutorials. Questions? Click here for the RTL Community Forum where you can get help on your programming.) SummaryLast week, we took a look at the Initial Balance concept and how you can predict a day’s rotational extremes using Double IB extensions. We outlined our goals for a trading system based on this strategy. Today, we will build a custom RTL indicator that mirrors the Market Profile 200% Initial Balance level on a regular candlestick or bar chart. It is important to note that the creation of a custom indicator is not the same thing as creating an actual trading signal that notifies you of trade entries; in fact, for a backtest, this custom indicator is not necessary at all. However, building the indicator offers two important advantages:
Build the IndicatorTo get started, create an intraday Session 2 chart using a simple minute-based periodicity, such as a 5-minute. We use Session 2 because our Initial Balance levels are based on the first hour of RTH trading, which is 8:30 am to 9:30 am Central Time. The overnight price action is not a part of this strategy. Next, use the File menu > New > Custom Indicator, or use the RTL button on your toolbar to pull up the RTL window. First, we will build the indicator that shows the 200% IB Hi level. Separately, we will then build a second indicator to show the 200% IB Low level, for a total of 2 custom indicators. In the RTL code, we use a “token” which automatically pulls in a value based on the outcome of a standard technical indicator. Each RTL token typically offers many different customizations, so the goal is to determine the right token(s) and then setup the tokens appropriately. Before we can choose a token, we need to clarify the math used to create the 200% IB levels: As you can see, the actual 200% IB levels depend on only one thing: knowing the high and low of the first hour of trading. The rest is simple math once we know this information. The token which provides us with the high and low of the first trading hour is: SESST (“Session Statistics”). The SESST indicator is one of the most useful tokens in MarketDelta as it lets you quickly parse through a day of price data for just the information you need. It can do many different things, so the token must be configured for the 1st Hour Hi and Low at some point during the process. Because the same token cannot simultaneously show both the 1st hour Hi and the 1st hour Low, we will actually use two different instances of SESST in each of our indicators. There are two different ways to configure tokens in the RTL code:
Either method is fine. Here we will show method 1, as it is faster once you get familiar with RTL coding. If you want a tutorial for method 2, click here for another blog post on creating custom indicators. In the RTL window, we simply write the code for the 200% IB Hi, based on the math illustrated above. We use parenthesis to organize the math, and we substitute the token SESST whenever we wish to include the first hour High or first hour Low. Since the Hi and the Low are each their own SESST variable, we differentiate between the tokens of the same type by adding an underscore and a name to each token. Type the RTL code into the RTL window for the 200% IB Hi: As you can see, this math simply means: First Hour Hi + IB Range But it is expressed using the RTL token SESST. Press Save and you will get pop-up windows to configure the two SESST tokens used: Change the noted parameters so SESST_HI properly pulls in the highest price of the first hour. After you press OK you are prompted to do the same for the next token, SESST_LOW, which is set to Lowest Price of the Low price of the First 60 minutes. Finally, after the tokens are configured, you are prompted to give a name to your new custom indicator. While not always necessary, it is a good idea to get into the habit of using the Check button in the RTL window after you are done and before you actually use the new RTL indicator. When you use parenthesis or involve complicated math in your RTL code, you should make sure the software is interpreting your math exactly as you’d expect. The Check button breaks down the algorithm into its parts so you can verify it is processing in the right order. After you press Check, a window appears:
Here, we see that the expression’s parenthesis is calculated first, and stored internally as a variable, T1. Then the program adds T1 to the SESST_HI token. This is exactly as we’d expect. Sometimes seemingly simple mathematics will not work as expected because of the ordering of your expression, thus you should always use Check, and parenthesis, to control how math is processed. Our 200% IB High indicator is now complete. Press “Send To” to add it to your chart that is currently active. Alternately, you can always add a custom indicator to any chart through the standard technical indicator window:
Or:
Either way, the indicator will then appear on the chart as a new separate pane: All technical indicators appear by default as their own individual pane when you add them to a chart. To overlay them on top of another pane, in this case the price pane, simply click and drag the indicator’s line up to the price pane. As an alternative, you can select the price pane at the time you initially add an indicator so ends up where you want it right away. You cannot use this method after the indicator is already on the chart. In the Add Indicator window:
Either way, after you add/move the indicator to the price pane, it appears:
If you so desire, you can customize its color and visual style by double-clicking the indicator line and select appropriate options in the Update Indicator window:
The 200% IB Hi custom indicator is now complete. Look at a Market Profile chart to make sure the indicator lines up with the same price points created by the IB Price Levels. You would repeat this process to create the 200% IB Low. The math:
This is simply the equivalent of: First Hour Low – IB Range Configure the tokens in the same way as for the prior custom indicator. After you complete this second indicator and add it to the chart, you will see your completed 200% IB price levels:
Always check the results visually to make sure the indicator lines up with what you expect. In this case, we compare the lines drawn on the chart with a Market Profile chart to ensure they are mirroring those levels accurately. Once we are confident that the indicator is correct, we no longer need to refer to Market Profile charts throughout the rest of this process as we build signals and backtest the strategy. In our next tutorial, we build our first trading signal based on this strategy. |










Press “Save” again. If you already have a chart open to which you want to add this signal, use the Send To button, as we did last time with the custom indicator. You will choose “Signal Marker” from the options.




















