tradesignal how to 05. i with equilla to trading success part 1 (english)
TRANSCRIPT
intalus.com/tradesignal-howto
05Issue
A publication ofPowered by
PART 1: Basics.
WITH EQUILLA TO TRADING SUCCESS.
EQUILLABASICS. 1
FIND THIS AND MORE TRADESIGNAL HOW TO ISSUES AT:
www.intalus.com/tradesignal-howto
IN ADDITION CHECK OUR TRADING TIPS VIDEOS AT:www.intalus.com/trading-tips
2
PART 1
WITH EQUILLA TO TRADING SUCCESS. TRADESIGNAL HOW TO. 05
WITH EQUILLA TO TRADING SUCCESS.PART 1: Basics.
If you want to enjoy the benefits of rule-based trading, you should be familiar with the programming of trading strategies. The translation of your own trading approach into programme code requires quite a lot of know-how. The first part of our new series on the formula-based language Equilla from Tradesignal is to show you how the language is structured and what options it offers to slowly create the basis for generating your own indicators and trading systems.
b Easy access due to formula-based language 4 b What is source code anyway? 7 b Functions form the basis for indicators 8 b How is the source code structured in Equilla? 9 b The first step has been done 14
NOTE:This paper was published in the German edition of the TRADERS’ magazine (issue 7/2014).
3
PART 1
WITH EQUILLA TO TRADING SUCCESS. TRADESIGNAL HOW TO. 05
www.intalus.com/tradesignal-howto
basics
60
www.traders-mag.com 07.2014
Teil 1: Grundlagenwissen
» Hand aufs Herz: Haben Sie Ihre Handelsstrategie schon
einmal einem Backtest unterzogen und auf ihre Robust
heit hin geprüft? Wissen Sie, wie hoch der maximale
Drawdown in der Vergangenheit ausfiel, welche Verlust
serien „normal“ sind und welchen Profitfaktor Sie erwar
ten können?
Für eine professionelle Software ist die Beantwor
tung dieser Fragen ein Kinderspiel. Dennoch nutzen viele
Trader diese Möglichkeit nicht. Der Grund: Das Einarbei
ten in die Welt der Programmierung ist oft sehr müh
sam und voller Stolpersteine. Dabei ist der Einstieg in die
Materie mit der von Profis geschätzten Finanzsoftware
Wer beim Trading die Vorteile des regelbasierten Handels genießen möchte, tut gut
daran, sich mit der Programmierung von Handelsstrategien zu beschäftigen. Die Über-
setzung des eigenen Handelsansatzes in einen Programmcode erfordert allerdings eine
ganze Portion Know-how. Im ersten Teil unserer neuen Serie zur Programmiersprache
Equilla aus dem Hause Tradesignal möchten wir zeigen, wie die Sprache aufgebaut ist
und welche Möglichkeiten sie bietet, um nach und nach die Basis für die Erstellung
eigener Indikatoren und Handelssysteme zu schaffen.
Mit Equilla zum Trading-Erfolg
EASY ACCESS DUE TO FORMULA-BASED LANGUAGE.
Be honest: have you ever subjected your trading strategy to a back test and checked it for robustness? Do you know what the maximum draw down in the past has been, which loss series are „normal“ and what profit factor you can expect? Answering these questions is a simple task for professional software. Nevertheless, many traders do not use this option because familiarisation with the world of progra-ming is often very tedious and full of catches. With Tradesignal, valued by financial professionals, it doesn‘t have to be so hard.
BY THE WAY: if you have already seen EasyLanguage by TradeStation before, you will quickly find your way within Equilla. Almost any program code can be re-used in Equilla (copy & paste).
4
PART 1
WITH EQUILLA TO TRADING SUCCESS. TRADESIGNAL HOW TO. 05
SHARE THIS TRADESIGNAL HOW TO!
The in-house programming language Equilla is based on the wide-spread languages of Pascal and Visual Basic and forms the basis for all indicators and trading systems that Tradesignal includes by default. These can be simply and comfortably pulled into the chart by drag and drop and are thus ready for use at once.
The best thing is that the respective source code can be viewed openly (open source) and so offers the best opportunity to imagine how the formula-based language thinks and performs changes by altering the code. For newcomers, this is a particularly good opportunity to get ahead in “learning by doing”, to slowly generate their first own indicators and trading strategies. There is barely any limit to your imagination.
5
PART 1
WITH EQUILLA TO TRADING SUCCESS. TRADESIGNAL HOW TO. 05
www.intalus.com/tradesignal-howto
WHAT IS SOURCE CODE ANYWAY?
In programming, source code means the text of a computer programme that is legible for people and written in a programming language. For it to be translated into binary machine language by the computer and then also executed (this is done by the “compiler”) the source code must contain all instructions precisely and comple-tely. According to proper syntax in “normal” languages, the source code therefore must be written under compliance with specific rules (called “syntax”). For traders this means: no matter if their programme is about entry into a position, exit or stop – everything must be defined 100 percent; the computer cannot handle “vague” rules. This is where many traders already notice that the strategy they believed to be clearly defined in fact contains many subjective elements. This is what must be eliminated if you want to trade 100 percent rule-based. Discipline is a prerequisite for performance – also when creating trading strategies.
The source code is generated in different ways, depending on software. Tradesignal offers two options: there is the Equilla Editor (see figure 1), which permits input of the programme lines according to a simple text editor, as well as the trading system wizard which permits entire trading strategies to be generated using individual components. Our article series focuses on the editor.
6
PART 1
WITH EQUILLA TO TRADING SUCCESS. TRADESIGNAL HOW TO. 05
SHARE THIS TRADESIGNAL HOW TO!
Figure 1: User interface in TradesignalTradesignal offers near-unlimited opportunities to generate indicators, chart patterns and entire trading systems with the formula-based language Equilla.
7
PART 1
WITH EQUILLA TO TRADING SUCCESS. TRADESIGNAL HOW TO. 05
www.intalus.com/tradesignal-howto
Figure 2: Function “AverageFC”The function shown above calculates a simple moving average. Functions are the foundation for indicators, from which trading strategies can be created.
Inputs: Price( NumericSeries ), Period( NumericSimple ); If Period > 0 Then AverageFC = SummationFC( Price, Period ) / Period
Else AverageFC = 0;
FUNCTIONS FORM THE BASIS FOR INDICATORS.
It is very simple to look “inside” the Equilla code. Right-click the trading system or the indicator in the chart. This shows you that every indicator, every chart pattern and all trading systems make use of functions. A function is a subordinate programme part into which calculations and programme instructions that need to be reused more often are outsourced.
A SIMPLE EXAMPLE: Instead of programming the complete calculation of the standard deviation every time, it is “packed” in a function and applied with a name. By calling the name, the programmer will have the desired result available at any time without detours and will be able to reuse it within the source code. To calculate a moving average (MA), the function “AverageFC” is already predefined in Tradesignal.
8
PART 1
WITH EQUILLA TO TRADING SUCCESS. TRADESIGNAL HOW TO. 05
SHARE THIS TRADESIGNAL HOW TO!
Figure 3: Equilla code for indicator „Simple Moving Average“The code contains all parameters that can later be changed or optimised by the user in the input area. Then there is the command for the graphical illustration of the moving average in the chart (DrawLine).
Meta: Categories("Trend Follower"), Synopsis( "This is the finished indicator, which calculates the Simple Moving Average. It is based on the functions AverageFC and SummationFC." ), ShortCode( "SMA" ), SubChart( False ); Inputs: Price( Close ), Period( 10, 1 ); DrawLine( AverageFC( Price, Period ), "SMA" );
HOW IS THE SOURCE CODE STRUCTURED IN EQUILLA?
The results of the functions just described form the basis for the actual indicator. As an example, we show the “simple moving average” (SMA) in figure 3, which per-mits the MA on a price series to be displayed. The associated code is used to explain the basic programme structure and syntax of Equilla.
9
PART 1
WITH EQUILLA TO TRADING SUCCESS. TRADESIGNAL HOW TO. 05
www.intalus.com/tradesignal-howto
Let us start with the header part of the code, which is always recognised by the term „Meta:“. Here, global (meta) information for the indicator is specified. In this specific case, the programmer has defined the following:
b Synopsis: A description of the indicator b ShortCode: A short code with which the indicator can be quickly loaded
into the chart via a keystroke b SubChart: The instruction that the indicator is not to be displayed in a
subchart (false), but the main chart
Next comes the input area. Here, the user-specific parameters called “inputs” are described, which can later comfortably be modified via the input mask of the soft-ware or optimised via an optimisation tool. In the specific case, the input “Price ( Close )”specifies that the SMA is to be calculated at the closing price. The input “Period ( 200, 1 )” is used to enter the period number. The standard setting here is specified with the value 200. Then number 1 after the comma means that 1 is the smallest possible input value.
10
PART 1
WITH EQUILLA TO TRADING SUCCESS. TRADESIGNAL HOW TO. 05
SHARE THIS TRADESIGNAL HOW TO!
Another important task is met by variables, which serve as a kind of “container” wit-hin the source code. They save results and make them accessible for further proces-sing and later use. This indicator code contains no such variables. In the second part of our Equilla series, we will deal in detail with their description and use in the scope of a trading system.
Let us now come to the next part of the programme. This is all about calculation. In this specific example, the MA must be calculated for each period. This is done by the function “AverageFC” that has already been mentioned. If the calculated indicator value is to be output in a visual form, only the right closing command is needed after this. With the expression “DrawLine”, the software is instructed to draw a line.
The attentive reader will have noticed here that the use of commas and semicolons plays an important role when programming. Generally, a comma is used in each case to specify inputs and variables. Only the end of the last instruction needs to use a semicolon so that the code can later be translated (“compiled”) properly. In Tradesignal, compiling can be started by pushing F7. The software does the rest.
11
PART 1
WITH EQUILLA TO TRADING SUCCESS. TRADESIGNAL HOW TO. 05
www.intalus.com/tradesignal-howto
Figure 4: Highlighting provides further informationFor detailed information and example applications it is helpful to right-click the blue terms.
BY THE WAY: in the Equilla editor named above, parts of the source code are highligh-ted in colour according to their functions (e.g. “DrawLine”). This makes it easier to read the code. Additionally, the visual structure helps in finding errors that – if present – will be displayed automatically in the editor with a precise line reference.
Particularly for new users, it is helpful to right-click the blue terms for detailed information and example applications. While writing code, small help windows also provide valuable advice on the proper use of a term.
12
PART 1
WITH EQUILLA TO TRADING SUCCESS. TRADESIGNAL HOW TO. 05
SHARE THIS TRADESIGNAL HOW TO!
www.intalus.com/tradesignal-howto
THE FIRST STEP HAS BEEN DONE.
All readers who have stayed with us until here have completed the first step towards programming. Congratulations! Figure 5 summarises the components with which a complete trading system is made up and what role functions and indicators play for the construction of trading systems in this in a chart.
In the next part of our Equilla series, you will learn how the SMA indicator presented here can be used to generate a trading system. Crosses of the price with the MA are used to close long or short positions. We will also deal with the meaning of loops within an Equilla code and deal with the implementation of a stop.
TRADESIGNAL HOW TO. SUBSCRIBE TODAY AND DON’T MISS AN ISSUE.Subscribe and you receive each new issue in time for publication.
13
PART 1
WITH EQUILLA TO TRADING SUCCESS. TRADESIGNAL HOW TO. 05
www.intalus.com/tradesignal-howto
The ultimate tools for making profitable investment decisions.
POINT & FIGURE CHARTS
FOR BEGINNERS.
intalus.com
01Issue
A publication of
Powered by
intalus.com/tradesignal-howto
03Issue
A publication of
Powered by
Proper optimization rather than curve fitting.
STRESS TESTING – HOW ROBUST IS YOUR STRATEGY?
Figure 5: Schematic structure of a trading systemThe interaction of indicators, patterns and so on, as well as the respective conditions that activate specific commands on demand is the basis of a rule-based trading system.
Function 1 Function 2 Function 3 Function 4
Indicator / Chart pattern A
Trading system XYZ
Indicator / Chart pattern B
Conditions
Commands
14
PART 1
WITH EQUILLA TO TRADING SUCCESS. TRADESIGNAL HOW TO. 05
SHARE THIS TRADESIGNAL HOW TO!
TR�DINGTIPS.
ALGORITHMICTRADING WITH
RENKO CHARTS.
SKYS
CRA
PER
01. M
enar
a C
arig
ali,
Ku
ala
Lum
pur.
The
to
day
s th
ird
talle
st b
uild
ing
in M
alay
sia
on t
he s
cale
of
26
7 m
etre
s hi
gh.
intalus.com
A publication of
Powered by
10Issue
SKYS
CRA
PER
02. P
etro
nas
Twin
Tow
ers,
Ku
ala
Lum
pur.
The
to
day
s ta
llest
bui
ldin
g in
Mal
aysi
a on
the
sca
le o
f 4
52
met
res
high
.
1–3
PARTS 1–3:How to combine Renko charts and Bar charts to create a profitable trading strategy.
© 2015 Intalus – www.intalus.com
Distribution allowed under a Creative Commons Attribution-Noncommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Tradesignal® is a registered trademark of Tradesignal GmbH. Unauthorized use or misuse is specifically prohibited.
All other protected brands and trademarks mentioned in this document conform, without restriction, to the provisions of applicable
trademark law and the copyrights of the respective registered owners.
ADVICE:Interested readers can download valuable information and practical advice on Equilla and Tradesignal from www.intalus.com/trading-tips – free of charge as a PDF or video. New every month!
15
PART 1
WITH EQUILLA TO TRADING SUCCESS. TRADESIGNAL HOW TO. 05
www.intalus.com/tradesignal-howto
intalus.com/tradesignal-howto
03Issue
A publication ofPowered by
Proper optimization rather than curve fitting.
STRESS TESTING – HOW ROBUST IS YOUR STRATEGY?
The ultimate tools for making profitable investment decisions.
POINT & FIGURE CHARTS FOR BEGINNERS.
intalus.com
01Issue
A publication ofPowered by
New features for more analysis power with ease of use.
WHAT’S NEW IN TRADESIGNAL 7.3.
intalus.com/tradesignal-howto
02Issue
A publication ofPowered by
STRESSTESTING – WIE ROBUST IST IHRE HANDELSSTRATEGIE?
Herausgegeben von
intalus.de/tradesignal-howto
In Zusammenarbeit mit
04Ausgabe
Erweiterte Auswertungsmöglichkeiten zur Risiko- und Ertragsmessung, Kategorie-Tags und neue Indikatoren.
WHAT’S NEW IN TRADESIGNAL 7.6.
www.intalus.com/tradesignal-howto
MORE HOW TO AND VIDEOS HERE
PROFIT FROM THESE TRADESIGNAL HOW TO & VIDEOS TOO.
TRADESIGNAL HOW TO 01
POINT & FIGURE CHARTS FOR BEGINNERS.
The ultimate tools for making profitable investment decisions.
TRADESIGNAL HOW TO 02
WHAT’S NEW IN TRADESIGNAL 7.3.
New features for more analysis power with ease of use.
TRADESIGNAL HOW TO 03
STRESS TESTING – HOW ROBUST IS YOUR STRATEGY?
Proper optimization rather than curve fitting.
TRADESIGNAL HOW TO 04
WHAT’S NEW IN TRADESIGNAL 7.6.Enhanced measures for risk and return, category tags and new indicators.
16
PART 1
WITH EQUILLA TO TRADING SUCCESS. TRADESIGNAL HOW TO. 05
SHARE THIS TRADESIGNAL HOW TO!
ORDER NOW: http://traders-media.com/intalus.html
20% DISCOUNT. FOR YOUR CLIMB.Order a TRADERS´ annual subscription and get an exclusive 20% discount as Tradesignal How-To-reader.
“TRADERS´ – Your Personal Trading Coach” is the education magazine to be read for private traders.Receive TRADERS´ magazine for one year and learn all about what you need to become a successful trader.
Tradesignal® is a product and registered trademark of Tradesignal GmbH, Bremen | www.tradesignal.com.
SPECIALOFFER!