Table of Contents
A Tradesq Case Study
I want to see that the simple pattern called Hammer or Hanging man works in future markets, but before beginning the test let’s see what the pattern is all about:
Definition: Source https://www.thinkmarkets.com/
How to use it
Short trades: Hammer Pattern and Close are higher than the open.
Long trades: Hammer Pattern and Close is lower than the open.
Now that we understand what a hammer pattern is, lets code in TradeStation Easylenguage the signals, the easiest way to do it, is to look at the resources that TradeStation already has:
Within the Prebuilt Studies, ShowMe Section, we can find: C_Hammer_HangingMan
And it will show us every hammer (Green and Red dots) on the chart:
Let’s have a look at the code that TradeStation has already developed:
As we can see, there is already a function called C_Hammer_HangingMan, so let’s take advantage and proceed to create our code and implement the entry signals:
Consideration for creating the code:
- Ability to choose Long only, short only, or both.
- Random Stop Loss and Profit Target exits.
Let’s check that our code is working correctly: (Red dot should be a short entry and the green dot a long entry)
We are ready to upload the code into Tradesq and select all 43 futures markets, the 11 timeframes, and the inputs range we want to test.
Let’s see the results:
We have many edges in the currency, energy, grains, index, and metals sectors.
High Grade Copper(@HG) 240m
Note: All results include trading costs, slippage and commission.
This test used a really simple pattern with some random Profit Target and Stop losses, and was only intended to find good edges on the futures markets. Using Tradesq saved us a lot of time and effort in selecting the best results, which found edges on five (5) different sectors of the futures markets. It does not mean these are strategies ready to trade. Additional filters and robustness tests must be applied, but it is a terrific starting point.
Juan Fernando Gómez (firstname.lastname@example.org)