stratester.com

Price · condition block

Price level

The price level block watches a fixed dollar price, such as $100,000. It can fire once when the close crosses that level, or on every candle while the close stays above or below it.

How the engine evaluates it

above is true on every candle whose close is strictly above the level; below on every close strictly below it.

crosses above is true only on the candle where the previous close was below the level and the current close is at or above it. crosses below is the mirror image. Crossings use closes only: a wick through the level does not count.

The level is a plain number. It does not move with the market, so it suits round numbers, previous highs and personal targets.

Formula
above:          close > level
below:          close < level
crosses above:  previous close < level  and  close ≥ level
crosses below:  previous close > level  and  close ≤ level

Botscript syntax

In the Lab you pick this block from the Price group and fill in its fields. In the code view the same condition is written like this:

price crosses above $100000
price crosses below $60000
price above 70000
price below 50000

Settings

SettingValuesDefaultNotes
Comparisoncrosses above, crosses below, above, belowcrosses aboveA one-candle event (crosses) or a state (above, below).
Priceany positive number$100,000In US dollars (the BTC/USDT quote).
Timeframethe run's candles, or 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d, 1wthe run's candlesOptional. At least the run's candle size and a whole multiple of it.

On a higher timeframe

Add a timeframe at the end to read Price level from bigger candles than the run uses, for example price crosses above $100000 on 1d. The engine builds those candles from the run's own candles (UTC, weeks start on Monday) and evaluates the block only on candles that have closed, so there is no look-ahead. Lengths and lookbacks count the bigger candles.

On a higher timeframe crosses above and crosses below are events: they fire once, on the run candle that closes the bigger candle where they happened. above and below are states that hold until the next bigger candle closes.

The timeframe must be at least the run's candle size and a whole multiple of it; otherwise the run stops with an error and is not charged. Multi-timeframe conditions covers the details, including warm-up.

How traders use it

  • Breakout of a round number: price crosses above $100000.
  • Regime filters: price above 30000 to only trade in a range you care about.
  • Hard exits: price crosses below $60000 with sell 100%.

Example bot

botscript
bot "Round Number Breakout"

when price crosses above $100000
then buy 100%

when price crosses below $95000
then sell 100%
  • Buys the first close at or above $100,000 after a close below it.
  • Sells everything when a close falls back below $95,000.

Pitfalls

  • Fixed levels age badly. A level that mattered in one year can be irrelevant in another, so a backtest across many years can mislead.
  • above and below are states that stay true for as long as the price does. Use the crosses forms when you want a single signal.

Price level: frequently asked questions

Does a wick through the level count as a cross?

No. Crossings compare closes only. Use the liquidity sweep block if you care about wicks through a level.

What if the close lands exactly on the level?

crosses above fires when the previous close was below and the current close is at or above the level, so landing exactly on it counts. Plain above needs a close strictly above.

Can the level follow the market?

Not this block. For moving levels use a moving average, Bollinger Bands, a Keltner Channel or a breakout of the last N candles.

Is the price in dollars?

Yes. The market is BTC/USDT, so prices are in USDT, which tracks the US dollar.

Simulated results are hypothetical. They include only the fee and slippage you set on the bot, not every real-world cost or market condition, and past performance does not guarantee future results. Nothing here is financial advice.