Let’s see a simple example. We create a Moving Average Crossovers robot in this Quick Start tutorial.
If you haven’t already, install Trading SM as explained in the Install article.
In Trading SM, we can build robots with a pre-created template. The template contains many features already added to the robot. In this tutorial, we create a trading robot using this template. If you want to learn how to create a trading robot from scratch, then you should read the Getting Started tutorial.
Open Trading SM and go to File -> New with template.
Now, we add the conditions to open buy and sell positions.
After that, we assign those conditions to the corresponding Long and Short rules. Rules are group of conditions. This rules are associated with trading actions, like buy and sell.
Finally, we save the trading robot.
The trading robot is ready, but first we have to compile the trading robot as explained in the following article: Generate Expert Advisor.
The Martingale Size answers the trading volume relying on the martin-gale mechanics.
There are two options: multiplication or addition. This way we determine how the trading volume is increased.
The number by which the volume of the last closed trade will be multiplied or added.
Here, we specify the symbol in which the last closed trade will be searched. So, if the last closed trade in this symbol is a losing one, the new trading volume will be calculated based on the two previous settings.
If you leave this setting empty, the chart symbol in which the Expert Advisor runs will be used.
Magic Number (optional)
In case we also want to filter by magic number, we provide the number here. This way the last closed trade of the symbol previously specified that also has this magic number will be used to calculate the trading volume.
Leave it empty and it will use the last trade no matter what magic number has.
Same logic as Magic Number. When we want to filter by comment.
In case you want to limit the number of times the trading volume is increased.
If you leave this field empty, trading volume will increase infinitely while losing trades occur consecutively.
Default Size (required)
You need to provide the default trading volume we get from this question when the last trade is a winning one or the limit has been passed.
You shouldn’t leave this setting empty. Otherwise, no trading volume will be provided to the trading action and thus the trading action will fail.
The answer is the price of a line drawn on the chart.
The name of the line.
Horizontal lines have the same price at each bar but the price of trend lines differs at each bar. Here, you specify the bar from what you need to know the line price.
Privacy & Cookies Policy
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.