This is a trading item or a component that was created using QuantShare by one of our members.
This item can be downloaded and used by QuantShare Trading Software.
Trading items are of different types. There are data downloaders, trading indicators, trading systems, watchlists, composites/indices...
You can use this item and hundreds of others for free by downloading QuantShare.
Top Reasons Why You Should Use QuantShare:
Works with US and international markets (stock, forex, options, futures, ETF...)
Offers you the tools that will help you become a profitable trader
Allows you to implement any trading ideas
Exchange items and ideas with other QuantShare users
Our support team is very responsive and will answer any of your questions
We will implement any features you suggest
Very low price and much more features than the majority of other trading software
Do you want to know how an asset performed in the past following a specific pattern or event?
Now, you can with the new trading indicator (PatternPerf) I am presenting here. It is the perfect indicator for creating adaptive strategy. Why? Because on each trading bar, this indicator tells you how the asset performed in the past for the current pattern or event.
Let us take an example: say you want to enter long a stock if its price is above the 25-bar moving average and enter short a stock if its price is below the same moving average. Besides this simply rule, you want to enter long or short only if past trades were profitable. This is called an adaptive trading strategy because the buy and short rules adapt to past market conditions. You will enter long or short a trade only if you are certain that the buy or short rule performed well in the past.
Buy = PatternPerf(event1, 10, 1000);
This function looks like the buy indicator (Buy Indicator) but it is not exactly the same. The "BuyInd" function returns past performance of a specific rule you define, while "PatternPerf" function returns past performance of an event that is happening now (current bar).
It should be easier to understand with an example. Let us define a specific event based on the relative strength indicator. The event can take three different values:
0: Stock is oversold
1: Stock is overbought
2: Stock is neither oversold nor overbought
r = rsi(14);
event1 = iff(r < 30, 0, iff(r > 70, 1, 2)); // Event1 = 0, 1 or 2
c = PatternPerf(event1, 10, 1000);
On bar X, if RSI state is equal to 1 (Overbought) then "PatternPerf" will return the average performance of all trades that are taken when the stock enters the overbought area. Each trade is closed after 10 days (2nd parameter) and only trades that happened in the past 1000 trading bars are considered (3rd parameter).
Note that trades are entered on next bar's open and closed after X days on next bar's open too.
Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.