Tuesday, March 20, 2012

A Quick Detour

The first part of trade automation that I am going to discuss is trade identification. As this involves both identification and a quick risk/reward analysis, before we get too far, I wanted to introduce a quick and dirty way to get a feel for targets and stops.

One very quick way to do this is to have pre-determined trading levels. For example, intra-day, we can use daily and weekly pivots. On longer-term timeframes, we can identify support and resistance levels on charts.

Using python, I quickly whipped up some support/resistance level using the most basic of algorithms. I defined support or resistance as that point where d(Price)/dt = 0, using close-only values to keep things simple. Other additions such as volume weighting, price binning, and intra-day movement can be added quickly to give better levels.

The results:

In the next post, I will use this simple chart to discuss risk/reward and trade identification for an automated trading system.


  1. Nice.

    a few months ago, I took a look at this same approach and really liked it. I got busy with life and stopped my work. I had started looking at volume profiles and weighting but didn't get too far with it.

    Looking forward to the next posts on the topic.

    1. Thank you!

      This really was the simplest little thing, thrown together to illustrate generating levels to trade against.

      Adding intra-day data would help it immensely, and volume would be another major upgrade. This serves our purpose for the time being, though.

      Really appreciate your input.