Skip to content

TWMA

Version: v.1.0.0.0

TWMA

Description

The Time-Weighted Moving Average (TWMA) is an advanced technical indicator tailored for traders who discern patterns not just based upon price action but also time of day. Differing from the traditional moving average, the TWMA assigns varying weights to price points depending on the time they occur, thereby enhancing the influence of data points within specific, strategic periods deemed more significant by the trader.

Formula

TWMA = (Σ(Pt × Wt) / ΣWt)

Where: Pt is the price at time t, Wt is the weight assigned to time t, and N is the number of periods used in the calculation.

The weight Wt can be defined, for example, as a function of the time of day. You can assign a higher weight to prices that occurred between 09:00 and 11:00.

Properties

  • TWMA Period [default: 14] — Defines the TWMA calculation period.
  • Wt const 1 [default: 2.618] — Weight assigned at a specific time to the weighted moving average calculation.
  • Wt const 2 [default: 3.382] — Weight assigned at a specific time to the weighted moving average calculation.
  • Wt const 3 [default: 5.236] — Weight assigned at a specific time to the weighted moving average calculation.
  • Wt const 4 [default: 8.191] — Weight assigned at a specific time to the weighted moving average calculation.
  • Wt color — Color for the weight visualization.

Weighted times

This group contains four time slots; for each slot you specify when the weight constant is applied to the price in the calculation.

  • Wt1 ? [default: true] — Enable weighted time 1.
  • Wt2 ? [default: true] — Enable weighted time 2.
  • Wt3 ? [default: true] — Enable weighted time 3.
  • Wt4 ? [default: true] — Enable weighted time 4.
  • Wt1 Start time [default: 09:30] — Start of weighted time 1.
  • Wt1 End time [default: 10:00] — End of weighted time 1.
  • Wt2 Start time [default: 09:30] — Start of weighted time 2.
  • Wt2 End time [default: 10:30] — End of weighted time 2.
  • Wt3 Start time [default: 12:00] — Start of weighted time 3.
  • Wt3 End time [default: 14:00] — End of weighted time 3.
  • Wt4 Start time [default: 03:00] — Start of weighted time 4.
  • Wt4 End time [default: 07:00] — End of weighted time 4.