View on GitHub

Williams %R Level Cross Strategy Diagram

Русский | 中文 | Español | Deutsch | Português | 日本語

Williams %R says where the close sits inside the range of the last candles, from 0 at the top to -100 at the bottom. This diagram trades the moment the oscillator walks into a zone rather than the moment it leaves one: a drop through the low level buys, a rise through the high level sells. Percent protection takes the trade off.

schema

Strategy Overview

  • Williams %R with a length of 14 is calculated on finished hourly candles, which the tester builds from the packaged five-minute history.
  • The signal is the crossing itself: the previous reading on one side of the level and the current reading on the other, so a long stay inside a zone fires only once.
  • This is the entry into the zone, the mirror image of the classic reading that waits for the oscillator to climb back out, and the diagram uses this Direct orientation.
  • Both long and short branches are wired; either branch can simply be unplugged to disable that side.

Entry and Exit Rules

  • Long entry: The previous %R was above the low level and the current one is at or below it, and the position is not long. The order buys one lot, which opens a long from flat or closes an existing short.
  • Short entry: The previous %R was below the high level and the current one is at or above it, and the position is not short. The order sells one lot, which opens a short from flat or closes an existing long.
  • Exit: The protection block closes the trade at a take profit of 2 percent or a stop loss of 1 percent from the entry price; before that, the opposite crossing flattens the position, because every order uses the same volume.

Parameters

Parameter Default Description
Williams %R Length 14 Look-back length of Williams %R.
Low Level -80 Level the oscillator has to drop through to arm a long entry.
High Level -20 Level the oscillator has to rise through to arm a short entry.
Take profit, % 2 Take profit distance from the entry price, in percent.
Stop loss, % 1 Stop loss distance from the entry price, in percent.
Volume 1 Order volume, in lots.
Candles 01:00:00 Candle time frame the whole diagram works on.

Diagram Details

  • The candle block feeds the indicator block with Williams %R, and a previous-value block keeps the reading from one candle back.
  • Four comparison blocks build the two crossings out of the previous and the current reading against the two level constants.
  • Two more comparison blocks test the position against a zero constant, and each logical AND joins one crossing with its position guard.
  • Both modify blocks send market orders with the volume of one shared constant, and their own trades feed the protection block that carries the take profit and the stop loss.
  • The diagram protects the position with percentages of the entry price, so the same values remain meaningful on any instrument.

Usage

Import the .json file into Designer, run it in the backtester on historical data, then adjust the parameters or the blocks themselves to fit your instrument before trading it live.