Specification

1. The idea of the trading system is as follows: market entries are performed when MACD's main and signal lines intersect in the current trend direction.

2. Trend is determined based on the Exponential Moving Average with the specified period (InpMATrendPeriod). If the current EMA value is greater than the previous one, the trend is seen as growing (ema_current > ema_previous). Alternatively, if current EMA is below the previous one, the trend is considered to be falling (ema_current< ema_previous).

3. Trading Signals:

  • Buy signal: the main MACD line crosses the signal line upwards (macd_current>signal_current && macd_previous<signal_previous).
  • Sell signal: the main MACD line crosses the signal line downwards (macd_current<signal_current && macd_previous>signal_previous). The below figure shows Buy and Sell cases.


4. Positions are closed at opposite signals: Buy positions are closed at Sell signals, and Sell positions are closed at Buy signals.

5. Positions are opened at the market price, when a new bar emerges. The Expert Advisor is to be tested using Open prices, so there is no need to add functions for disabling operations inside the bar.

6. Additional filters for opening a position:

The absolute value of MACD's main line will be used to filter out weak signals: the signal is only confirmed if this value is greater than open_level (in points). Signal confirmation conditions are as follows:

  • Confirmation of a buy signal: Abs(macd_current)>open_level
  • Confirmation of a sell signal: macd_current>open_level

7. Additional filters for closing a position:

The absolute value of MACD's main line will also be used to confirm position closure: the signal is confirmed if this value is greater than close_level (in points). Close signal confirmation conditions are as follows:

  • Confirmation to close Buy positions — macd_current>close_level
  • Confirmation to close Sell positions — Abs(macd_current)>close_level

8. Close by Take Profit — during position opening, a Take Profit level is set at a fixed distance from the open price, specified in points. The value is set in the InpTakeProfit input parameter.

9. Position management

TrailngStop is used to protect profit. Stop Loss is set if profit in points exceeds the value specified in the InpTrailingStop parameter. If the price continues to move in the profit direction, Stop Loss should be trailed at the given distance. Stop Loss cannot be moved towards the loss direction, i.e. the Stop Loss value cannot be increased. If none of protective orders (Take Profit or Stop Loss) triggers, the position should be closed by an opposite signal. No other position exit methods are available.


What is contained in the Requirements Specification?

Trading idea

Describe the general underlying idea in the first part of the Requirements Specification. Example: "If the price approaches the resistance level twice and rolls back from it, the next time it is likely to break resistance." Here you can add a chart with the resistance/support lines, indicators and explanatory notes. Exact numbers or calculation algorithms are not required in the idea description. So, in this example we do not need to explain how to determine:

  • resistance level,
  • level breakout,
  • the concept of "is likely to".

Some abstraction at the initial stage will help focus on the idea rather than on technical details. This way you can generate multiple modifications of your trading strategy by replacing or combining strategy blocks, indicators and filters. With the common general idea, you will use different input parameters for your trading robots.

Next, you need to describe all terms and concepts contained in the idea description. If trend is important for your strategy, clearly define what indicator should be used to determine the trend direction and strength. The numerical characteristics of these definitions form the basis of Expert Advisor's input parameters, and can be optimized in the Strategy Tester. So, the first section of the Requirements Specification is "The Trading Idea".

Terms and definitions

It is recommended to create a separate section in the Requirements Specification for explaining related terms and definitions. Explain terms in separate paragraphs. Use bold font to highlight the key concepts of your trading strategy. Where applicable, you may add an image. Input parameters of the desired EA can be written in italics.

Trading signals

This is the most important section of Requirements Specification. It provides the description of conditions, market states and indicator values, under which a Buy deal should be performed. To describe each condition required for generating a Buy signal, choose the numeric parameter affecting the emergence of a signal. For example, this may be the smoothing type and period for a Moving Average. These important parameters will be used as your Expert Advisor's input parameters.

Provide a separate description of sell conditions, even if they are opposite to buying. This may have specific features, which the programmer may misinterpret. For example, your Buy condition may be set to "Value > 0". Make sure to indicate an exact condition for selling, such as "Value < 0" or "Value <= 0".

Additional conditions and filters are often used for confirming or canceling trading signals. Use screenshots for various market situations with the visual explanation of indicators and setups. In future, such visualization may help you to analyze situations, when your EA ignores a seemingly obvious signal or performs a deal at an unfavorable moment.

Screenshots and flow charts

You may use any of free programs for creating screenshots and flow charts. Tips on what programs to choose and how to use them are provided in the article How to create Requirements Specification for ordering an indicator. Also, the article provides recommendations on ordering an arrow indicator generating buy and sell signals. Such an indicator running separately from the Expert Advisor, makes it easier to check and monitor your trading robot both during real-time operation and in visual testing.

The lifetime of signals/orders/positions

The second important part of a trading strategy is exiting an open position and deleting pending orders. Trading signals can also be canceled after some time or under certain events. Therefore, you need to describe conditions to close a buy/sell position, remove a pending order or cancel a signal.

Management of open positions and pending orders

If your trading strategy implies closing by Stop Loss and Take Profit, describe the calculation algorithm. Optionally, you can request a trailing mechanism for a flexible modification of these levels. In this case, you need to describe Trailing Stop conditions and algorithms. SL/TP modification can be performed at a bar opening or on every tick. Specify the desired option in the Requirements Specification. Also, the on-tick and on-bar options influence strategy testing. Make sure to read the article Testing trading strategies on real ticks.

Where do I get Requirements Specification if I can't create it?

A poorly drafted Requirements Specification or its absence often indicates that the trading system rules have not been formulated. So, what the Customer calls a trading system is actually only an idea. All nuances and absence of required logic descriptions will be revealed during the development process. The developer will have to think out possible options, which were not provided by the Customer.

The Developer may program a trading robot at his own risk in this case. But you are likely to lose much time discussing every possible issue. If the robot's behavior then differs from the Customer's expectations due to a lack of a proper description, such an order may be sent for an Arbitration. Customers often accuse the Developer for the incorrect programming of the robot. However, the Arbitration decision will be based on the Requirements Specification. According to the Freelance Rules, any other correspondence will not be taken into consideration during disputes:

During arbitration, the basis for decision making is only the Requirements Specification.

Sometimes, a customer may have clear trading rules, but may not be able to create the Requirements Specification for some reasons. Problems may arise with the correct description, math formulas, neural network or machine programming related issuers, and other aspects. In this case, the creation of the Requirements Specification can be ordered. This can be done in the "Programming Advice" or "Other" sections of the Freelance service.

Choose one of these categories, create an order named "Creating Requirements Specification for a trading robot order" and specify the initial cost of the work. An experienced developer of trading systems will help you to describe your strategy Rules in a clear and easy-to-understand form. Use screenshots to show setups of your trading signals based on charts, indicators and graphical objects you use.

The programmer will try to understand your trading system and help you prepare a description of the trading algorithm. If you cannot formulate any concepts (for example, "momentum" or "rebound from the level"), the programmer can suggest ready ideas based on his experience. As a rule, any market situation can be described logically (and then programmatically) by some simple model with variation parameters. Such a variation can be expressed by a certain parameter, which you will later optimize in your Expert Advisor.

Perfect patterns do not exist, because the market never repeats. However, similar situations can be found in history. Your cooperation should result in a ready Requirements Specification, which you may use to order a trading robot.


Responded

1
Developer 1
Rating
(96)
Projects
143
76%
Arbitration
0
Overdue
2
1%
Free
2
Developer 2
Rating
(284)
Projects
458
39%
Arbitration
93
44% / 18%
Overdue
72
16%
Loaded
Published: 2 codes
Similar orders
to compile all the suitable markets for buy and place a buy for the shortest timeframe and place a sell for also a shortest timeframe it should work with all brokers and can automatically place a trade as long as its connected to the internet it should inform where the contracts are placed and for how long
I would like to have a fully automated stock trading strategy programmed in PowerLanguage (MultiCharts 64-bit, including Portfolio Trader). Attached you will find the specifications (PDF document). Communication will be conducted exclusively in writing via email. Please send me a binding, fixed-price offer with a schedule (framework programming, testing, documentation). If you have any questions, please feel free to
i use several indicators on TV. I then use stochastic to count waves on price chart and waves of momentum on mACD chart. Then i use other indicators like FVg and liquidyt to enter trade . CAn anyone code this for me for alerts and automation and semi automation . ? Also can you code in ProrealTime the language is called Pro builder
Mql5 indicator 30+ USD
I'm looking for an indicator that gives buy sell signals by placing arrows on the chart Signals must not repaint or be placed with an offset I want it to be accurate enough so j can trade from signal to signal amd actually make profit Do anyone have a strategy and skill to create such an indicatore First priority is to mql5
I need a trading robot that uses heikin ashi charts, ema’s, buystops, moving stops, buy limits. Trading fixed hours, being able to dynamically calculate lot sizes. Calculate stop loss distance in pips by identifying a swing high or swing low. I will give full details if someone is truly interested in making this a robot
Can anyone help me fix my thinkorswim indicator, the alert is not working well there are some delays before i get my messages The red arrow triggered at 7:00 am yesterday but did not send a notification alert in the TOS platforms message center till 7:28AM. The blue arrow triggered at 6:30AM but didnt send a message r alert till 6:48 AM. That needs to change so the arrow alerts are the same as the notification alerts
I’m looking for a highly experienced EA developer who can do more than just code — someone who can help design, build, and test a profitable Expert Advisor for MetaTrader 4 or 5 (your choice). I don’t have a finalized strategy yet, so I’m looking for someone who can: Propose proven EA logic based on live market performance Help me choose from styles like scalping, trend-following, breakout, or swing Build in smart
Hello, I am looking for a programmer who can convert from pine script to mql5. You will receive 7 different trading view indicators to convert to Mql5. You may find them simple and straightforward or not. I repeat this could turn out to be very painstaking and strenuous if you are not well versed in Pine Script to Mql5 conversion. However, you will add unified alert system to simplify things on mql5 and to alert
This EA Hedge your prop firm account's position in real account so if the propfirm challenge fail you made the challenge fees in your real account and then purchase other challenge with that amount . To use PROP EA, you'll need two types of accounts: a prop challenge account and a live account. You must deposit two times the amount you bought the challenge with e.g. you bought a challenge with 200$ you must deposit
Hello, I need some help with my ninja script I have a pine script strategy I’m trying to convert to ninja script strategy. I done it but the profits are not matching and the reason I’m seeing is it’s difficult to set both a SL and Trailing Stop simultaneously and my strategy needs those

Project information

Budget
30+ USD
For the developer
27 USD