Create a Custom Signal in RTL for Value Area trades

Posted in RTL by astoeckley on December 13, 2010

We are happy to announce the birth of our RTL Community Forum where you can ask questions and get help on learning RTL, and for troubleshooting issues with your custom indicators and signals. We encourage you to post your RTL questions at the forum, as you will benefit from many readers who can offer insight into your programming. Our technical support team also checks the forums on a daily basis to provide input.

For an introduction to RTL, please read our previous article on building a custom indicator to familiarize yourself with the features of RTL. You can also quickly access all of our blog articles on RTL by viewing the RTL category link for this blog.

MarketDelta Professional versions provide an advanced engine for creating custom indicators, scans and signals, and then running backtests on those signals. Custom trading signals place markers on a chart that alert you to specific entry or exit criteria. You program these criteria into the software using RTL. They can notify you in real-time when your desired conditions are met, and they also show historical signals from prior trading days.

Creating a custom signal is similar to building a custom indicator. The window layout and RTL syntax is the same. In this article, we outline the basics of programming a signal and showing signal markers on a chart. In future articles, we will take this to the next step: backtesting a signal to determine its historical profitability.

Concept

All trading signals begin with an idea you have for a particular trading strategy. Today we look at a basic idea using the Value Area. By Value Area, we refer to the prior day’s value area high and low.

Whether you study Market Profile charts or use the Profile or TPO indicators on candlestick or footprint charts, you no doubt realize how import Value Area highs and lows can be.

Here is an example showing the reversals that often take place at the Value Area:

This particular chart uses the Profile indicator on a day session chart (Session 2 for the E-mini S&P futures), with the following settings:

This instance of the Profile indicator is only on the chart to help see the validity of the signals you create. These particular settings do not apply to the actual RTL signal you will create, which will have its own instance of Profile indicator inside the RTL window, called a “token.”

To see all the profiles for all the days on your chart, the “Compute Last” should be set to a large number, equivalent to the number of days you show on your chart.

Strategy

We want to create a signal that alerts us as the instrument (in this case, the ES contract) approaches the Value Area Low from below. That is, the session begins with the contract trading below yesterday’s established value. As it rises and approaches value, the signal suggests a short entry.

This is an easy signal to create. It’s important to note that this is only one signal that might exist as part of an entire strategy built around similar entries. For example, you might also go long at the Value Area High as price drops from above value. That would be a separate, distinct signal, and you would apply both of these to the same chart or trading system. In this article, we look only at the short entry, to get you started with the process.

Coding the Signal

Click your RTL button on the main toolbar to open a signal, and then choose “New Signal.”

The syntax for this signal is simple, as follows:

There are three tokens used in this RTL code: SESST, PROF and HI. Two of these are indicators: SESST and PROF. The two indicators must have specific settings, and the program automatically prompts you for these settings when you save this signal. Otherwise, you can instead, optionally, first create the tokens from the list, pulling them over into the right side of this window for use in your code.

In any case, the settings for these two tokens are:

This pulls in yesterday’s (Prev) value area low.

This finds the highest price reached during the day (session) by the time the current bar prints.

The RTL code, shown above in the RTL window, is:

SESST.1<PROF AND (PROF-HI)<1

This code will create a signal as price gets within 1 point of the Value Area Low, from below. This makes it possible to signal a potentially rewarding short trade even if the price doesn’t exactly hit the level.

The first part of the code states that the highest intraday price reached by the end of the previous bar is lower than the value area low. This means that the market opened, and has remained, below the value area so far during the day. “SESST.1″ refers to the historical value of the SESST indicator/token from one bar ago. Since PROF remains the same all day, it is not necessary to add a “.1″ after it, though you could and it would make no difference in this particular case.

The second part of the code simply requires that the price difference between the Value Area Low and current bar’s highest price is less than 1 point. Again, this is optional; I include it here to give some “front running” potential to the trade. In a backtest, you could experiment to see if front running was really necessary, or if front running by a greater or lesser amount would make a difference to long term success. We’ll investigate this in future blog articles.

After you save and send this signal to the chart, you will see markers such as these:

Because we have the Profile indicator added to the chart, we can verify if the signal is working properly. Note how the signal correctly triggered a short entry marker when the market bounced off these Value Area Lows from below.

The signal marker itself is highly customizable. You can change the icon, the color, the placement or even trigger sounds when the signal criteria is met:

Hopefully this will get you thinking about how you can quickly build these indicators. As you can see, the actual RTL code is often quite minimal for common trading ideas.

Check back with this blog to see more examples in coming weeks.

0 Responses to Create a Custom Signal in RTL for Value Area trades

No comments.


Add a Comment