: | : | :期货程序化 | :期货程序化研究 | :期货量化学习 | :期货量化 |
返回列表 发帖

[TS源码] Key Reversal Pattern

所需阅读权限 1

[TS源码] Key Reversal Pattern

Today we analyze the Key Reversal Candlestick Pattern. You will learn how to create and use this indicator in your automatic trading systems. We start with the simple High and Low Bar Reversal.

The Reversal Bearish Bar occurs when:

Today Price High > Yesterday Price High                       
and
Today Price Close < Yesterday Price Close

The Reversal Bullish Bar occurs when:

Today Price Low < Yesterday Price Low                       
and
Today Price Close > Yesterday Price Close

This pattern alone is not very significant, because you can see it appears frequently. Anyway, we create a little trading system to test these signals.

The Trading System opens a short and long position. We stay in a position for X days, without a stop-loss. We stay in a position for X days. Time frame: Daily – SPY ETF for this test.

The results show the inconsistency of this strategy. As we can see, only the long side has an acceptable percent of profitable trades. This means that the price reverses only after a bullish pattern, but not strongly enough. In fact, the average net profit is too small.

So this pattern is not significant even when considered alone. It’s clear that the price doesn’t react fast after. Let’s go to analyze the more specific pattern.

Key Reversal Bar
The Key Reversal Bearish Bar occurs when:

Today Price Open > Yesterday Price Close
and
Today Price High >Yesterday Price High
and
Today Price Close < Yesterday Price Low

The Key Reversal Bullish Bar occurs when:

Today Price Open < Yesterday Price Close
and
Today Price Low >Yesterday Price Low  
and
Today Price Close > Yesterday Price High

The key reversal bars open with a price gap. So, this pattern is only for daily charts because in an intraday chart is very difficult to find a gap.

When you see this pattern, you know that there is a change in the market sentiment. You can see the strength of the price movement that anticipates a change in the direction.

Many times this pattern is like Pin Bar and Outside Day Bar. In this chart, there are two consecutive patterns that are Outside Day and Key Reversal at the same time.

论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
 
期货论坛 - 版权/免责声明   1.本站发布源码(包括函数、指标、策略等)均属开放源码,用意在于让使用者学习程序化语法撰写,使用者可以任意修改语法內容并调整参数。仅限用于个人学习使用,请勿转载、滥用,严禁私自连接实盘账户交易
  2.本站发布资讯(包括文章、视频、历史记录、教材、评论、资讯、交易方案等)均系转载自网络主流媒体,内容仅为作者当日个人观点,本网转载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。本网不对该类信息或数据做任何保证。不对您构成任何投资建议,不能依靠信息而取代自身独立判断,不对因使用本篇文章所诉信息或观点等导致的损失承担任何责任。
  3.本站发布资源(包括书籍、杂志、文档、软件等)均从互联网搜索而来,仅供个人免费交流学习,不可用作商业用途,本站不对显示的内容承担任何责任。请在下载后24小时内删除。如果喜欢,请购买正版,谢谢合作!
  4.龙听期货论坛原创文章属本网版权作品,转载须注明来源“龙听期货论坛”,违者本网将保留追究其相关法律责任的权力。本论坛除发布原创文章外,亦致力于优秀财经文章的交流分享,部分文章推送时若未能及时与原作者取得联系并涉及版权问题时,请及时联系删除。联系方式:http://www.qhlt.cn/thread-262-1-1.html
如何访问权限为100/255贴子:/thread-37840-1-1.html;注册后仍无法回复:/thread-23-1-1.html;微信/QQ群:/thread-262-1-1.html;网盘链接失效解决办法:/thread-93307-1-1.html

If we create another trading system to test this pattern, we can discover that the short side doesn’t work. The long side is profitable, but the number of total trades is too low and is difficult to insert some filters.

6-excel-results2-key-reversal
Why did we hold the position for only 5 days?  Because we would like to understand if the price reacts fast after the pattern.

If you want to use this pattern as a filter, you need to know how fast the price reacts.

If we hold the position for many days, we can see that the results became better.

7-results-with-hold-position-reversal-pattern
We can also try a volume filter for educational purposes.
如何访问权限为100/255贴子:/thread-37840-1-1.html;注册后仍无法回复:/thread-23-1-1.html;微信/QQ群:/thread-262-1-1.html;网盘链接失效解决办法:/thread-93307-1-1.html

TOP

Volume filter
The Key Reversal Pattern generally shows a violent price movement. The price could change direction if institutional traders open large positions. If this is true, you will also observe an increase in volumes.

To add this filter you have to create a Volume Moving Average.

MA_Volume = Average(Volume, 20);

When the daily Volume is bigger than his 20 periods moving average, the pattern is valid.

Conclusions
The Key Reversal Pattern could work as a filter, but it occurs too rarely.

We test the long side of this system with 18 U.S. major stocks over a 20 year period, $10,000 for every trade with no stoploss with a 5 days schedule to exit the trade.

This is the video with the trading system results in TradeStation:

We observe many good results so this pattern could be a valid filter for many instruments.

If you use the key reversal as a filter, remember that the overall number of trades that you will decrease, because this pattern is infrequent.

It’s also important to consider the trend, the reversal is only noise in a range-bound market.

Also, support and resistance are important, because near this area the pattern is stronger.

As a discretionary trader, you could create a market scanner for a large portfolio of Stocks.
如何访问权限为100/255贴子:/thread-37840-1-1.html;注册后仍无法回复:/thread-23-1-1.html;微信/QQ群:/thread-262-1-1.html;网盘链接失效解决办法:/thread-93307-1-1.html

TOP

This is the Code of the Indicator and the Strategy:
指标部分:




信号部分:

如何访问权限为100/255贴子:/thread-37840-1-1.html;注册后仍无法回复:/thread-23-1-1.html;微信/QQ群:/thread-262-1-1.html;网盘链接失效解决办法:/thread-93307-1-1.html

TOP

返回列表