Writing an article on "How to write a TOR for a trading robot" - page 5

 
Andrey F. Zelinsky:

A brief outline of an article on the advisor's TOR.

Introduction. The article is written solely for the customer, "a dilettante", taking into account its extremely low level of understanding of the subject. Often, customers do not know what can happen to them.


p.s.2 Many points are clearly explained in two articles of the Composter. You can cross-reference, borrow, clarify.

I've only seen one article, can you tell me which one?


 
Aleksey Panfilov:

I've only seen one article. Can you tell me which one?

There was also this one.

Советник на заказ. Инструкция для трейдера.
Советник на заказ. Инструкция для трейдера.
  • 2007.04.10
  • Andrey Khatimlianskii
  • www.mql5.com
Форум от их обилия, естественно, лучше не становится. Эта статья предназначена именно для тех, кому нужна помощь в написании советника. Кроме координат действующих экспертописателей в ней будут даны некоторые рекомендации по общению с ними и описаны часто возникающие проблемы. Что необходимо сделать до заказа эксперта? Перед тем, как искать...
 
Aleksey Panfilov:

I only saw one article, can you tell me which one?


Corrected the author of the article - now both articles are shown in Andrew's profile


 

This is tinier, this is what the article needs so that there is no such churn:

Суть работы эксперта одновременно открываются 1 бай 1 селл!
1 the outcome if the price goes in a different direction (for example -100 pips) orders are fixed at 0 that is 1 buy gives -100 pips 1 sell gives +100 pips about 0!
3 orders should be opened and closed at the sameprice eg bid 1550 not ask 1548 i.e.opening and closing price UNITED for sell and buy one and the same!

Sit on the whole, and decide for yourself at what price is more profitable to work at, a bid or ask, it depends on the situation =)

I'd really like to see the customer in person and fuck him.

Фриланс-сервис на MQL5.com: Нужно создать експерта который будет одновременно открывать два разнонаправленных ордера 1 на бай 1 на селл .
Фриланс-сервис на MQL5.com: Нужно создать експерта который будет одновременно открывать два разнонаправленных ордера 1 на бай 1 на селл .
  • www.mql5.com
1 вариант исхода  если цена идет в не заданном направлении (например -100 пунктов) ордера фиксируются в 0 тоесть 1 бай дает -100 пунктов 1 селл дает +100 пуктов примерно 0! 2 Открытие и закрытие должно происходить МОМЕНТАЛЬНО. так как отложенные ордера тейк профиты и стоп лосы не подходят нужно чтоб программа сама открывала и закрывала ордера...
 

The concept has changed - we are not trying to adjust to the level of the most inexperienced customer. Now we want to raise the level of the customer to an advanced user of the trading platform, so that he can communicate with the experts and speak the same language.

I am waiting for your comments and suggestions.

ARTICLE PLAN

Что нужно для заказа торгового робота

... need a set of formal rules

Why it is important to have a good ToR

... he who thinks clearly, writes clearly.

What should be in the ToR

... the idea behind it (in general), the description of terms and signals, the input/output algorithm

good screenshots of Signal descriptions where nothing is superfluous

block diagrams

Where do you get the TOR if you can't write it yourself?

----Rarely it happens that there is a strict trading system, but you can't describe it. Most likely, there is no system, in this case.

But if the question is only in terminology (ignorance of the language spoken by expert writers) - then you can first create a work on preparing the TOR

Draw inputs on charts, describe them in words, read articles/books.

What terms to use

... it is better to describe terms that you are not sure of in order to understand each other

In the TOR, terms should be marked in bold - the implementer may pay attention to them and ask questions if anything is unclear

No references to other sources (websites/books, etc.) Everything must be described here and now, no "I'll explain later on Skype

What to write in the job description in Freelance

... I just need a general formulation - trend, counter-trend, level breakdown (how levels are determined in brief), are there indicators/Price Action/the use of ticks

General idea of trading strategy

... We trade following the trend, trend is defined as such, we buy on a pullback, we define pullback as such, we do not trade in the evening or in the morning

Description of the set on waiting for the Signal

... it is necessary to form the flat, followed by the breakthrough or we wait till the end of the European session and accept the signals only in the direction of its movement

Description of the Signal

... Technical parameters of the description - trend/rebound/break-down - all formalized strictly

Signal lifetime

... how long the signal lasts - in bars / hours / until the end of the session / day

Entering orders and opening positions

... are there any special features, e.g. do not place SL/TP ,

or how many times we try to enter the market ..,

or setting different oredermagic/ordercomment depending on time/setup/pattern

something else

Trade position/order maintenance

... if there is a trailing stop or not

when we put TS

moves pending orders behind/against price

Track current profit/loss on open position

something else

Cancel order and close position

... delete orders by time/number of bars/period end/opposition change/setup loss

... close position by time/number of bars/period end/period end/received profit/opening of opposite signal/setup

something else

Calculating the lot for placing an order

.... on balance

fixed

from accumulated profit

by results of last N trades

from risk (SL distance)

something else

Processing of trading errors and environment conditions

... detailed logging when sending trade orders

terminal/connect/server restart processing

feedback via messengers/email

Difference between trading on bar opening and inside the bar

... signals can disappear and appear during the lifetime of the bar

Tick/scalper strategies

...you should have a good idea of what it is, the smaller the pips of TakeProfit/StopLoss, the more critical the strategy is of the spreads/commissions/network delays/quality of history available/the speed of the robot itself.

Any worsening of conditions can kill the strategy

Grids, martingales, averages and the flipside of these improvements

... What they are, why they are popular and how much they can help to temporarily pull a strategy. The risk is increased, although it can lengthen the life of a bad strategy

What to look out for when choosing a performer

... Substantive questions

Is not being clever in order to impress

Clearly states a realistic timeframe and cost (no "we'll see how it goes"). The deadline and price can be increased, if it turns out that moments that really could not be foreseen in advance, or it was decided to make additional work

Points out unclear areas in the TOR right away, not after 2 months of discussion

A good programmer appreciates his and your time - so he likes a well-constructed, consistent terms of reference

What a programmer cannot do for you

Turn a losing strategy into a profitable robot

Carry out the optimization and identify all the shortcomings

It is your job to find them and describe them in a way that is understandable.


 
Rashid Umarov:

I am waiting for your comments and suggestions

for your article -- great example of a re-rating indicator -- which doesn't meet the definition of re-rating that you gave in your article on indicator ToR.

see the indicator herehttps://www.mql5.com/ru/job/78910-- the indicator itself is for example in my discussion thread

 

The point "Redrawing and how to deal with it" -- I would add to the article and look at it separately and in detail:

-- what is re-risking: definition

-- types of re-risking -- examples of indicators which are considered by many to be re-risking but they are not (fractal, zig-zag)

-- how to identify re-risking

-- how to work with a re-risking indicator: what to expect if a re-risking indicator is used in your Expert Advisor

 

Continuing to write the article, current version

What do you need to order a trading robot?

Trading robots are programs that execute the algorithms that are built into them. Algorithms are a set of actions to be executed when a particular event occurs. For example, the most common task in algotrading - the event definition "New bar", when the occurrence of which the robot must perform the necessary actions for the trading system - check for trading signals and make on them the appropriate actions.

But before you think about writing or ordering a trading robot, you need to have a trading system with clear rules to determine the opportune moments for trades. The development of any trading system, even the most complex one, always starts with basic things, namely the development of buy and sell trading signals. Then you can add various follow-up and close options to it.

You do not need to spend years at the monitor of the trading terminal to develop your trading strategy. There are hundreds of proven ideas published on the Internet and in books, which you can try. And even if you are not entirely confident in your programming skills, this is not an obstacle. The Freelance service will help you find a suitable developer and safely pay for the work you do.

But before you throw yourself into the exciting element of algotrading, we recommend you to read some useful articles on the subject:

Why it is important to have a good TOR

When ordering any product, you should formulate technical requirements - what tasks it should solve, what conditions it is to operate in, what will happen in emergency situations, what method of control it is to be used. Trading robots are programs and should work strictly according to the stated logic. But before the necessary algorithm of actions is programmed, it should also be clearly described.

The description of trading strategy rules should be formulated as Terms of Reference. And the better and clearer it is, the less misunderstanding between you, as the customer, and the programmer, as the Executor of your Order, will be.

The most important thing in the terms of reference is the presence of formal unambiguous Trading Rules. Even if you are not going to order a trading robot on the side, but want to write it yourself - start by developing these rules for yourself. Draw up a Requirements Specification and be sure to include items for testing/optimization of the Expert Advisor. Also add hypotheses for testing the quality of your trading strategy - by what criteria you will select the optimal parameters, and why you think these criteria are important.

Include all the stages of creating the trading robot in the requirements specification - this will not only help the Appliciant/Developer to understand the algorithm, but also you, months or years later. Remember that algorithmic trading is not a hobby, but the same monotonous research path over years, which should be documented. For yourself to a greater extent than for the programmer who will write the robot for you.

Develop the skills of a bureaucrat who likes to lay things out. It will come in handy for you. And programmers like to have clear, unambiguous terms of reference.

What should be in the terms of reference

For a quick introduction to the essence of the trading robot, dedicate the first paragraph of your Technical Order to the trading idea/hypothesis it contains. For example: "If price approaches a resistance level twice and pulls back each time, it will usually break it the third time." Here you can attach a chart with plotted lines, superimposed indicators and captions that illustrate this idea. It is not necessary to give specific numbers or calculation algorithms to describe the idea - in this case we do not immediately begin to explain how we determine

  • resistance level,
  • level breakdown,
  • the concept of "as a rule".

This allows you to focus on the idea itself rather than on the technical details. This method allows for subsequent generation of many more varieties of your trading strategy - you will simply replace some blocks of the strategy with other ones, add or replace filters. The idea itself will not change, only the names and values of input parameters of your trading robot will change.

Next, you need to give a description of all terms used in the idea description. If the trend is important to the strategy, give a clear description of how it will be determined - on the basis of which indicator, how the direction and strength of the trend will be determined. Numerical characteristics of these definitions will form the basis of the Expert Advisor input parameters, and they will be further optimized in the strategy tester. So name the first section of your terms of reference - Trade idea.

For the description of terms, we recommend to allocate the second section of the requirements specification - Terms. In this section, for each term, write a separate paragraph, put the terms in bold type, to highlight the key concept of your trading strategy. If necessary - add an illustration to the term description, which shows the most necessary for understanding.

Then you are ready to make up the third section - Trading Signals- in which you will describe under what conditions, market conditions, and indicator readings a buy occurs. To describe each condition required for generating a Buy signal, you will need to select a numeric parameter, on which the signal appears. For instance, for a moving average it will be the smoothing type and period. These important parameters will be put in the input parameters of the future Expert Advisor.

Even the simplest trading idea very quickly starts to grow additional conditions and filters, which confirm the trade signal or, vice versa, prohibit the trade. Therefore, it is important to make explanatory screenshots for each market situation, which visually show the necessary indicators and sets. This will allow you to quickly deal with situations in which your Expert Advisor missed an apparently obvious trading signal or suddenly made a deal at an inappropriate time.

...

block diagrams

Where can you get the ToR if you can't make it yourself?

----Rarely does one have a rigorous trading system, but fail to describe it. There is probably no system, in which case.

But if the only issue is terminology (lack of knowledge of the language spoken by Expert Advisors) - then you can first create a work on drawing up the ToR

Draw inputs on charts, describe them in words, read articles/books.

What terms to use

... it is better to describe terms that you are not sure of, in order to understand each other

In the ToR, put the terms in bold - let the implementer pay attention to them and ask a question if something is unclear

No references to other sources (websites/books, etc.) Everything must be described here and now, no "I'll explain later on Skype

What to write in the job description in Freelance

... only need a general wording - trending, counter-trending. on the breakdown of levels (how levels are defined in short), whether there are indicators/Price Fseshcht/the use of ticks

General idea of trading strategy

... We trade following the trend, trend is defined as such, we enter on a pullback, the pullback is defined as such, we do not trade in the evening and in the morning

Description of the pattern waiting for the Signal

... it is necessary to form a flat, followed by its breakthrough or we wait until the end of the European session and accept the signals only in the direction of its movement

Description of the Signal

... The technical parameters of the description - trend/rebound/breakdown - everything is formalized strictly

It's better to set up the Buy and Sell Signals separately at first.

It will be better if the Expert Advisor puts markers/objects of signals on the chart

It would be better if the signal indicators were made separately

Signal lifetime

... how long the signal lasts - in bars / hours / until the end of the session / day

Placing orders and opening positions

... Are there any specific features, e.g., we do not place SL/TP at once ,

or how many times we try to enter the market ..,

or setting different oredermagic/ordercomment depending on time/setup/pattern

something else

Trade position/order maintenance

... if there is a trailing stop or not

when we put TS

moves pending orders behind/against price

Track current profit/loss on open position

something else

Cancel order and close position

... delete orders by time/number of bars/period end/opposition change/setup loss

... close position by time/number of bars/period end/period end/received profit/opening of opposite signal/setup

something else

Calculating the lot for placing an order

.... on balance

fixed

from accumulated profit

by results of last N trades

of risk (SL)

something else

Processing of trading errors and environment conditions

... detailed logging when sending trade orders

terminal/connect/server restart processing

feedback via messengers/email

Difference between trading on bar opening and inside the bar

... signals can disappear and appear during the lifetime of the bar

Tick/scalper strategies

...you should have a good idea of what it is, the smaller the pips of TakeProfit/StopLoss, the more critical the strategy is of the spreads/commissions/network delays/quality of history available/the speed of the robot itself.

Any worsening of conditions can kill the strategy

Grids, martingales, averages and the flipside of these improvements

... What they are, why they are popular and how much they can help to temporarily pull a strategy. The risk is increased, although it can lengthen the life of a bad strategy

What to look out for when choosing a performer

... Substantive questions

Is not being clever in order to impress

Clearly states a deadline

Points out unclear areas in the TOR right away, not after 2 months of discussion

A good programmer appreciates his or your time - so like a well-constructed, consistent ToR

What can't a programmer do for you

Turn a losing strategy into a profitable robot

Conduct optimization and identify all the shortcomings

Write a program without bugs - they will be anyway. Find them and describe them in an understandable way - your task.


 
Rashid Umarov:

Continuing to write the article, current version

What is all this for ?

The requirements specification is written by the programmer (or a specially trained third party - consultant). And it includes a checking methodology.
Any unnecessary demands to the customer, he is not obliged to be aware of all programming.

The customer should say (in writing, not video or Skype):

- I use these indicators and scripts

- I stick to the following rules

- Have traded on more or less official demo for one week, month or year, this is how much. And in another period like this. All optionally backed up by copying to a cent account.

- you need to automate

The Developer prepares and agrees upon TT (in a form understandable to both parties), writes an owl, and if everything in the tester more or less converges with the mentioned period, then the Expert Advisor is done.

Options - you need to check on the demo/centre-real/etc., it is already beyond the limits of freelancing

 
Maxim Kuznetsov:

Variants - you have to check on the demo/centre-real/etc, it's beyond the scope of freelancing

This is where a lot of details and errors occur. Therefore, testing for an EA should always be done on real quotes.

You just need to take this into account, and agree on a reasonable timeframe.

Reason: