JForex Example: Dual-Timeframe Moving Averages Setup

This post describes the setup for my Dukascopy JForex automated trading strategy in July. Note that this strategy is built for competing in a contest and not for real trading (i.e., it’s purely a no cost gamble).

Here is the step by step process of the setup for a long position:

  1. Determine the current trend by the relative position of current price to its moving average in a higher time frame. In particular, a price above the moving average in the higher time frame is deemed as bullish.
  2. Entry: Price moves above a moving average in the current time frame (red line in Figure 1) with a higher high, low, and close (HLC). As illustrated in Figure 1, the two bars circled.
  3. Exit: Crossing below a regular moving average (blue dotted line).

EURUSD setup example

As you can see, the setup itself is simple. Less than a fifth of the source code is devoted to the entry and exit. Most of this strategy involves automated position sizing and risk management to not let profits turn into losses.

The complete source code of this strategy is available in the introductory post.

Related posts:

  1. An explanation of my Keltner Channel and Candlestick hybrid setup
  2. New moving average
  3. JForex Example: Multiple-time frame strategy
  4. An introduction to my Forex Trend Continuation Setup (FTC)
  5. Sixth place finish in the Dukascopy JForex July strategy contest

No Comments

Trackbacks/Pingbacks

  1. JForex Example: Not letting profit turn to losses with a breakeven stop | Quantisan.com - [...] Trading Strategy « JForex Example: Dual-Timeframe Moving Averages ...
  2. JForex Example: Multiple-time frame strategy | Quantisan.com - [...] this cleared, I can go over my dual moving average entry signal setup in the next post later this ...

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>