Case study – creating custom building block – ROC indicator
In this short case study, I will show you how to create a custom block and then how to use it in a real trading strategy. Possibility of extending StrategyQuant with your custom-building blocks without programming is a unique feature that no other software offers.
Firstly let me explain what the custom block is. Every trading strategy consists of entry filters, entry conditions, exits, different calculations, etc. If you disassemble the trading robot into elementary pieces then you will get building blocks. To say it simply, they are bricks which create trading robots.
Before we proceed to our practical example let me explain which kind of custom blocks we can add.
Condition example: Entry filter for uptrend: Close > MovingAverage(200)
The output is True/False
Price level example: MonthlyHighestLevel
The output is price level
Value example: ROC indicator
The output is a number which we can use for other calculations/conditions.
Creating ROC indicator
The ROC indicator returns the value of the price percentage change during the certain period. If the period is 5 and the price drops by 5% during the last five days then the indicator output is -5. In case of price rise, it would be 5.
ROC = [(Close – Close n periods ago) / (Close n periods ago)] * 100
Adding the ROC indicator as the custom block:
Firstly, we open “Custom block” editor.
Add new custom block – type value:
Add custom block parameters
Define ROC formula in SQ
Now you can start using ROC custom block in your trading strategies
You can also download the ROC custom block here and import it into StrategyQuant.
In the next article, I will show you a practical example of how to use ROC custom block in the trading strategy.
In StrategyQuant X 131, we have added two new comparison blocks. In this article we will discuss them in more detail. Comparison blocks are snippets that we can use in the Algo wizard or Builder and are used to be able to compare two values. ( Left and Right )
Futures contracts have been around for over 300 years. It provides opportunities not only to hedge against future price fluctuations in various commodities and financials and also to speculate and trade more actively both manually and algorithmically. StrategyQuantX offers a very efficient to do so.
Futures and forex trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones’ financial security or life style. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results.
Hypothetical Performance Disclosure:
Hypothetical performance results have many inherent limitations, some of which are described below. no representation is being made that any account will or is likely to achieve profits or losses similar to those shown; in fact, there are frequently sharp differences between hypothetical performance results and the actual results subsequently achieved by any particular trading program. One of the limitations of hypothetical performance results is that they are generally prepared with the benefit of hindsight. In addition, hypothetical trading does not involve financial risk, and no hypothetical trading record can completely account for the impact of financial risk of actual trading. for example, the ability to withstand losses or to adhere to a particular trading program in spite of trading losses are material points which can also adversely affect actual trading results. There are numerous other factors related to the markets in general or to the implementation of any specific trading program which cannot be fully accounted for in the preparation of hypothetical performance results and all which can adversely affect trading results.
Testimonials appearing on www.strategyquant.com may not be representative of the experience of other clients or customers and is not a guarantee of future performance or success.