Double EMA Peak
Draws a double exponential moving average (DEMA) of the close and marks a sequence of higher-high, trough and exit peaks on that line.
What you see
- A line in Line Color: the double exponential moving average (DEMA) of the closing price. A DEMA follows price more closely than a plain EMA of the same length.
- Small yellow dots: a peak of the DEMA that starts a new sequence or rises above the lower peaks before it (a higher high).
- Small red dots: the next trough of the DEMA after such a peak.
- Larger purple dots: the next peak after that trough, the exit peak. It closes the sequence, and the search starts again from there.
The dot colors are fixed; Line Color only changes the line.
How to read it
A peak is a point where the DEMA is at least as high as the values around it, a trough the mirror case. Range sets how many values before the point are compared, Look Back Range how far the comparison reaches after it. Because later values are needed, a dot appears only once those candles have closed, and the newest stretch of the line carries no dots yet.
The sequence yellow, red, purple outlines one swing of the smoothed price: a push to a new high, the pullback, and the following swing high. Use it as a structure aid on top of the line rather than as a stand-alone signal.
Using it in strategies
The output value is the DEMA line itself; the dots are not available as outputs. In the Trade Setup you can use it like any moving average, for example the close crossing above the line as a trigger or the close staying above it as a filter. In WickScript read it with use indicator "Double EMA Peak" with period 21 as dp and dp.value (dema itself is a built-in function, so it can't be the name).
Settings
Open the settings with the slider icon next to the indicator (Indicators, F3). Numeric settings can be swept as Step 1 / Step 2 parameters when you run a strategy.
Inputs
| Setting | Type | Default | Description |
|---|---|---|---|
| Period | Number | 9 | Length of the two EMAs that make up the DEMA. Larger values give a smoother, slower line. (min 1) |
| Look Back Range | Number | 2 | How far after a candidate point the comparison reaches. Despite the name, it looks at the following candles: larger values confirm peaks and troughs later but ignore small wiggles. (min 1) |
| Range | Number | 2 | How many values before a candidate point it must match or exceed (peak) or stay at or below (trough). Larger values mark fewer, more significant turning points. (min 1) |
Styles
| Setting | Type | Default | Description |
|---|---|---|---|
| Line Color | Color | #64fbcf |
Outputs
These values can be used in Trade Setup triggers, filters and exits (see Trade Setup) and in WickScript.
| Output | In WickScript | Description |
|---|---|---|
| value | value | The DEMA of the close. |
Use in WickScript
use indicator creates this indicator inside a script, with settings by their ID. Each output is a field of the name after as. See WickScript indicators.
wickscript 1
indicator "Double EMA Peak from the list" on chart
use indicator "DEMA Peak" with period 9 as myDemapeak
show myDemapeak.value as line "value"