Log in

Maximum

How the maximum keeps the highest value since the start, why it has no window, and how to use it in a QTSurfer strategy.

The maximum is the highest value seen since the start of the run. It only goes up.

Try it on a series below.

The series are samples, synthetic ones and real crypto ones. They show how the indicator behaves, not what it earns. The line is computed in your browser by the engine’s own indicator class, so it is the line a strategy reads.

What it computes

maximum = max(maximum, value)        from the first update

It has no window and it starts with the first value its source is ready to give. Over another indicator the warm-up is left out: the maximum starts at the first value the indicator is ready.

Reading it

  • It is a record, not a channel. Once the price sets a high, the line stays there until a higher one, however long that takes.
  • It depends on where the run starts. The same date reads another maximum in a run that began earlier.
  • For the highest of the last N bars, use the Donchian channel, which forgets.

In a strategy

setup:
  max("price")

max("price") registers maxprice, and max("top", "price") registers it as top. In Java, .max("price") on the builder.