Skip to main content

Signal Generator

Type: signal_generator • Category: flow • Tags: signals, trading, strategy, conditions, backtest

Description

Generate trading signals based on configurable conditions

Parameters

NameTypeDescriptionRequiredDefault
datastringOHLC/indicator data from upstream workeryes
time_fieldstringTimestamp field name in your datano"datetime"
long_conditionsarrayConditions to open long position. Each condition: {left, operator, right}no[]
long_logicstringHow to combine long conditionsno"AND"
short_conditionsarrayConditions to open short positionno[]
short_logicstringHow to combine short conditionsno"AND"
close_modestringWhen to generate close signals: reverse (on opposite entry), conditions (explicit only), both, or none (rely on backtest SL/TP)no"reverse"
close_long_conditionsarrayConditions to close long position (used when close_mode is 'conditions' or 'both')no[]
close_long_logicstringHow to combine close long conditionsno"AND"
close_short_conditionsarrayConditions to close short position (used when close_mode is 'conditions' or 'both')no[]
close_short_logicstringHow to combine close short conditionsno"AND"
signal_modestringHow to handle repeated signals: 'first' (only when condition becomes true), 'every' (on each bar condition is true), 'cooldown' (with minimum gap)no"first"
cooldown_barsnumberMinimum bars between signalsno0
cooldown_secondsnumberMinimum seconds between signalsno0
allow_pyramidingbooleanAllow multiple entries in same directionnofalse

Help

📊 Signal Generator

Generate trading signals from your data based on customizable conditions. Connect the output directly to the backtest_strategy worker.


🎯 Quick Start

Simplest Example - Buy when RSI < 30

{
"data": "{{workers[0].results}}",
"long_conditions": [
{"left": "rsi", "operator": "<", "right": "30"}
]
}

Buy and Sell Signals

{
"data": "{{workers[0].results}}",
"long_conditions": [
{"left": "rsi", "operator": "crosses_above", "right": "30"}
],
"short_conditions": [
{"left": "rsi", "operator": "crosses_below", "right": "70"}
]
}

⚡ Key Features

FeatureDescription
Flexible ConditionsCompare any fields with 15+ operators
Cross DetectionDetect when values cross above/below each other
Nested AND/OR LogicComplex conditions like (A AND B) OR (C AND D)
Close ModesControl when positions are closed (4 modes)
Field ExpressionsMath on fields: high - low, close + 10
Percentage Functionspct_change(close), pct(close, open) for % calculations
Previous Bar AccessReference previous values with field[-1]
Signal FilteringAvoid duplicates with first or cooldown modes
String/Text OperatorsFilter by symbol, news, patterns

🎯 Signal Mode (Avoiding Duplicates)

The signal_mode parameter controls how repeated signals are handled:

ModeDescriptionUse Case
first(Default) Only signal when condition BECOMES trueAvoid duplicates - most common
everySignal on every bar the condition is trueTesting, specific strategies
cooldownRequire minimum gap between signalsFine-tuned signal frequency

Example: The Problem

With condition close &gt; 4000:

  • every mode: Generates signal on EVERY bar where close > 4000 (many duplicates!)
  • first mode: Only generates signal on the FIRST bar where close > 4000
{
"signal_mode": "first",
"long_conditions": [{"left": "close", "operator": ">", "right": "4000"}]
}

Signal only when price CROSSES above 4000, not while it stays above.

cooldown mode

{
"signal_mode": "cooldown",
"cooldown_bars": 10,
"long_conditions": [{"left": "close", "operator": ">", "right": "4000"}]
}

After a signal, wait at least 10 bars before allowing another.

{
"signal_mode": "cooldown",
"cooldown_seconds": 3600,
"long_conditions": [{"left": "rsi", "operator": "<", "right": "30"}]
}

After a signal, wait at least 1 hour (3600 seconds) before allowing another.


📥 Inputs

Data

Connect OHLC data with indicators from upstream workers. Example data row:

{
"time": 1700000000,
"open": 100, "high": 105, "low": 99, "close": 104,
"rsi": 72, "sma_20": 101, "sma_50": 98
}

🔧 Condition Format

Each condition is an object with:

{
"left": "field or expression",
"operator": "comparison operator",
"right": "value, field, or expression"
}

Supported Operators

Numeric Operators

OperatorDescriptionExample
&gt;Greater thanrsi > 70
&gt;=Greater or equalclose >= sma_20
&lt;Less thanrsi < 30
&lt;=Less or equalclose <= sma_50
==Equaldirection == 1
!=Not equaltrend != 0

Crossing Operators

OperatorDescriptionExample
crosses_aboveCrosses from below to aboversi crosses_above 30
crosses_belowCrosses from above to belowrsi crosses_below 70

String/Text Operators

OperatorDescriptionExample
containsText contains substring (case-insensitive)symbol contains "USD"
not_containsText does not contain substringnews not_contains "bearish"
starts_withText starts with prefixticker starts_with "BTC"
ends_withText ends with suffixpair ends_with "USDT"
matchesRegex pattern matchdescription matches "bull.*pattern"
is_emptyField is empty or nullnotes is_empty ""
is_not_emptyField has valuesignal is_not_empty ""

Value Types

TypeExampleDescription
Number70Static number
Fieldsma_20Field from data
Field Mathhigh - lowMath between two fields
Expressionsma_20 + 2Field with number math
Previousclose[-1]Previous bar's value
Previous Mathclose[-1] - closeCompare previous to current
Text"USD"Literal text string
Percent Changepct_change(close)% change from previous bar
Percent Functionpct(close, open)% difference: (a-b)/b×100

📈 Percentage Change Functions

pct_change(field)

Returns the percentage change of a field from the previous bar. Formula: (current - previous) / previous × 100

Signal when price rises 3% or more from previous bar:

{"left": "pct_change(close)", "operator": ">=", "right": "3"}

Signal when price drops 5% or more:

{"left": "pct_change(close)", "operator": "<=", "right": "-5"}

Signal on any big move (up or down 2%+):

{"left": "abs_pct_change(close)", "operator": ">=", "right": "2"}

abs_pct_change(field)

Returns the absolute percentage change (always positive). Use when you care about the size of the move, not the direction.

Signal when volume changes by 50% or more (up or down):

{"left": "abs_pct_change(volume)", "operator": ">=", "right": "50"}

pct(a, b)

Returns percentage difference between any two values. Formula: (a - b) / b × 100

Signal when close is 2% above open (within same bar):

{"left": "pct(close, open)", "operator": ">=", "right": "2"}

Signal when current high is 1% above previous high:

{"left": "pct(high, high[-1])", "operator": ">=", "right": "1"}

Signal when RSI increased by 10% from previous bar:

{"left": "pct(rsi, rsi[-1])", "operator": ">=", "right": "10"}

Complete Example: 3% Price Spike Entry

{
"long_conditions": [
{"left": "pct_change(close)", "operator": ">=", "right": "3"},
{"left": "volume", "operator": ">", "right": "volume[-1]"}
],
"long_logic": "AND",
"signal_mode": "first"
}

Long signal when price jumps 3%+ with increasing volume.

Complete Example: Volatility Breakout

{
"long_conditions": [
{"left": "abs_pct_change(close)", "operator": ">=", "right": "2"},
{"left": "close", "operator": ">", "right": "open"}
],
"long_logic": "AND",
"short_conditions": [
{"left": "abs_pct_change(close)", "operator": ">=", "right": "2"},
{"left": "close", "operator": "<", "right": "open"}
],
"short_logic": "AND"
}

Trade big moves (2%+) in direction of the candle.


🔢 Math Expressions

You can use math operators in both left and right values.

Supported Operators

OperatorExampleDescription
+close + 10Addition
-high - lowSubtraction
*atr * 2Multiplication
/close / 100Division

Multiply Field by Number

{"left": "volume", "operator": ">", "right": "avg_volume * 2"}

Signal when volume is greater than 2× average volume.

Multiply Two Fields

{"left": "close * volume", "operator": ">", "right": "1000000"}

Signal when price × volume exceeds 1 million (dollar volume).

ATR-Based Threshold

{"left": "close", "operator": ">", "right": "close[-1] + atr * 2"}

Signal when price breaks 2×ATR above previous close.

Percentage of Price (Division)

{"left": "high - low", "operator": ">", "right": "close / 100"}

Signal when candle range is more than 1% of price.

Previous Bar with Multiplier

{"left": "close", "operator": ">", "right": "close[-1] * 1.03"}

Signal when close is 3% above previous close.

Volume Spike Detection

{
"long_conditions": [
{"left": "volume", "operator": ">", "right": "volume[-1] * 3"},
{"left": "close", "operator": ">", "right": "open"}
],
"long_logic": "AND"
}

Signal on 3× volume spike with bullish candle.

Bollinger Band Width

{"left": "bb_upper - bb_lower", "operator": ">", "right": "close * 0.04"}

Signal when Bollinger Band width exceeds 4% of price.


📝 String/Text Condition Examples

Filter by Symbol

{"left": "symbol", "operator": "contains", "right": "BTC"}

Signal only when symbol contains "BTC".

Exclude Specific Pairs

{"left": "pair", "operator": "not_contains", "right": "JPY"}

Signal when pair does NOT contain "JPY".

Signal Type Filter

{"left": "signal_type", "operator": "==", "right": "buy"}

Signal when signal_type equals "buy".

Pattern in News/Description

{"left": "headline", "operator": "matches", "right": "bull|bullish|surge"}

Signal when headline matches any of the patterns (regex).

Non-Empty Confirmation

{"left": "confirmation_signal", "operator": "is_not_empty", "right": ""}

Signal only when confirmation_signal field has a value.


📊 Multi-Column Expressions

Candle Size (Pips/Points)

{"left": "high - low", "operator": ">", "right": "0.0020"}

Signal when candle is larger than 20 pips.

Up Candle (Bullish)

{"left": "close - open", "operator": ">", "right": "0"}

Signal when candle closes higher than it opened.

Down Candle (Bearish)

{"left": "close - open", "operator": "<", "right": "0"}

Signal when candle closes lower than it opened.

Gap Up

{"left": "open", "operator": ">", "right": "high[-1]"}

Signal when current open is above previous high.

Higher High

{"left": "high", "operator": ">", "right": "high[-1]"}

Signal when current high exceeds previous high.

Current Up + Previous Down (Reversal Pattern)

Use nested AND group:

{
"long_conditions": [
{
"logic": "AND",
"conditions": [
{"left": "close - open", "operator": ">", "right": "0"},
{"left": "close[-1] - open[-1]", "operator": "<", "right": "0"}
]
}
]
}

Signal when current candle is up AND previous was down.

Candle Body vs Wick Ratio

{"left": "close - open", "operator": ">", "right": "high - low * 0.6"}

Note: For complex expressions, consider pre-calculating in upstream worker.


🔀 AND/OR Logic

Simple AND (all conditions must be true)

{
"long_conditions": [
{"left": "rsi", "operator": "<", "right": "30"},
{"left": "close", "operator": ">", "right": "sma_200"}
],
"long_logic": "AND"
}

Result: Long signal when rsi &lt; 30 AND close &gt; sma_200

Simple OR (any condition can be true)

{
"long_conditions": [
{"left": "rsi", "operator": "<", "right": "30"},
{"left": "close", "operator": "<=", "right": "bb_lower"}
],
"long_logic": "OR"
}

Result: Long signal when rsi &lt; 30 OR close &lt;= bb_lower

Nested Groups (complex logic)

For (A AND B) OR (C AND D):

{
"long_conditions": [
{
"logic": "AND",
"conditions": [
{"left": "rsi", "operator": "<", "right": "30"},
{"left": "macd", "operator": ">", "right": "0"}
]
},
{
"logic": "AND",
"conditions": [
{"left": "close", "operator": ">", "right": "sma_50"},
{"left": "volume", "operator": ">", "right": "avg_volume"}
]
}
],
"long_logic": "OR"
}

Result: (rsi &lt; 30 AND macd &gt; 0) OR (close &gt; sma_50 AND volume &gt; avg_volume)


🚪 Close Signal Modes

The close_mode parameter controls when close signals are generated:

ModeDescription
reverse(Default) Close when opposite entry signal occurs
conditionsClose only when explicit close conditions are met
bothClose on reverse signal OR when close conditions are met
noneNever generate close signals (rely on backtest SL/TP/time exits)

Examples

Mode: reverse (default)

  • Long signal triggers → enters long
  • Short signal triggers → closes long, enters short
  • No explicit close signal needed

Mode: conditions

  • Long signal triggers → enters long
  • Short signal triggers → enters short (no close of long!)
  • Only closes when close_long_conditions are met

Mode: both

  • Closes on reverse signal OR when conditions are met
  • Most flexible option

Mode: none

  • Never generates close signals
  • Useful when you want backtest_strategy to handle all exits via:
    • Stop loss / Take profit
    • Trailing stop
    • Time-based exits (max_hold_duration, close_at_time)

📝 Strategy Examples

RSI Mean Reversion

{
"long_conditions": [
{"left": "rsi", "operator": "crosses_above", "right": "30"}
],
"short_conditions": [
{"left": "rsi", "operator": "crosses_below", "right": "70"}
],
"close_mode": "reverse"
}

Moving Average Crossover with Exit Conditions

{
"long_conditions": [
{"left": "sma_20", "operator": "crosses_above", "right": "sma_50"}
],
"close_long_conditions": [
{"left": "sma_20", "operator": "crosses_below", "right": "sma_50"}
],
"short_conditions": [
{"left": "sma_20", "operator": "crosses_below", "right": "sma_50"}
],
"close_short_conditions": [
{"left": "sma_20", "operator": "crosses_above", "right": "sma_50"}
],
"close_mode": "conditions"
}

Breakout with Volume Confirmation

{
"long_conditions": [
{"left": "close", "operator": ">", "right": "high[-1]"},
{"left": "volume", "operator": ">", "right": "avg_volume * 1.5"}
],
"long_logic": "AND",
"close_mode": "none"
}

Uses backtest SL/TP for exits.

Complex Multi-Condition Entry

{
"long_conditions": [
{
"logic": "AND",
"conditions": [
{"left": "rsi", "operator": "<", "right": "40"},
{"left": "macd_histogram", "operator": ">", "right": "0"}
]
},
{
"logic": "AND",
"conditions": [
{"left": "close", "operator": ">", "right": "sma_200"},
{"left": "adx", "operator": ">", "right": "25"}
]
}
],
"long_logic": "OR"
}

Enters long when: (RSI &lt; 40 AND MACD &gt; 0) OR (Price &gt; SMA200 AND ADX &gt; 25)

Candle Size Filter (20+ Pips)

{
"long_conditions": [
{"left": "high - low", "operator": ">", "right": "0.0020"},
{"left": "close - open", "operator": ">", "right": "0"}
],
"long_logic": "AND"
}

Long signal when candle is bullish AND larger than 20 pips.

Bullish Reversal (Up After Down)

{
"long_conditions": [
{
"logic": "AND",
"conditions": [
{"left": "close - open", "operator": ">", "right": "0"},
{"left": "close[-1] - open[-1]", "operator": "<", "right": "0"}
]
}
]
}

Long signal when current candle is UP and previous candle was DOWN.

Bearish Reversal (Down After Up)

{
"short_conditions": [
{
"logic": "AND",
"conditions": [
{"left": "close - open", "operator": "<", "right": "0"},
{"left": "close[-1] - open[-1]", "operator": ">", "right": "0"}
]
}
]
}

Short signal when current candle is DOWN and previous candle was UP.

Higher High Breakout

{
"long_conditions": [
{"left": "high", "operator": ">", "right": "high[-1]"},
{"left": "close", "operator": ">", "right": "open"}
],
"long_logic": "AND"
}

Long when making higher high with bullish close.

Gap Up Entry

{
"long_conditions": [
{"left": "open", "operator": ">", "right": "high[-1]"}
]
}

Long signal when price gaps up above previous high.

Two Consecutive Up Candles

{
"long_conditions": [
{"left": "close - open", "operator": ">", "right": "0"},
{"left": "close[-1] - open[-1]", "operator": ">", "right": "0"}
],
"long_logic": "AND"
}

Long signal when both current and previous candle are bullish.


🔗 Connection to Backtest

[Data Source] → [Indicators] → [Signal Generator] → [Backtest Strategy]

{signals: [...]}

In backtest worker, set:

signals: {{workers[X].signals}}

📤 Output

signals

Array of signal objects:

[
{"time": 1700000000, "action": "long"},
{"time": 1700003600, "action": "close"},
{"time": 1700007200, "action": "short"}
]

summary

Statistics about generated signals:

{
"total_signals": 150,
"long_signals": 50,
"short_signals": 50,
"close_signals": 50,
"data_rows": 1000
}

🔧 Complete Parameters Reference

📥 Input Data

ParameterTypeRequiredDefaultDescription
dataarray✅ Yes-OHLC/indicator data from upstream worker. Use {{workers[0].results}}
time_fieldstringNodatetimeTimestamp field name. Dropdown shows available fields

📈 Entry Conditions (Long)

ParameterTypeDefaultDescription
long_conditionsarray[]Conditions to open long position
long_logicstringANDHow to combine: AND (all must be true) or OR (any can be true)

📉 Entry Conditions (Short)

ParameterTypeDefaultDescription
short_conditionsarray[]Conditions to open short position
short_logicstringANDHow to combine: AND or OR

🚪 Exit Conditions

ParameterTypeDefaultDescription
close_modestringreverseWhen to close positions (see modes below)
close_long_conditionsarray[]Conditions to close long (when close_mode is conditions or both)
close_short_conditionsarray[]Conditions to close short (when close_mode is conditions or both)
close_long_logicstringANDLogic for close long conditions
close_short_logicstringANDLogic for close short conditions

Close Mode Options

ModeDescriptionUse Case
reverse(Default) Close when opposite signal occursMost common, simple strategies
conditionsClose ONLY when explicit close conditions metSeparate entry/exit logic
bothClose on reverse OR when conditions metMaximum flexibility
noneNever generate close signalsUse backtest SL/TP/trailing

🎯 Signal Filtering

ParameterTypeDefaultDescription
signal_modestringfirstHow to handle repeated signals
cooldown_barsnumber0Min bars between signals (cooldown mode only)
cooldown_secondsnumber0Min seconds between signals (cooldown mode only)
allow_pyramidingbooleanfalseAllow multiple entries in same direction

Signal Mode Options

ModeDescriptionUse Case
first(Default) Only signal when condition BECOMES truePrevents duplicates, most common
everySignal every bar condition is trueTesting, accumulation strategies
cooldownRequire minimum gap between signalsFine-tuned frequency control

📖 Real-World Strategy Examples

1️⃣ RSI Oversold/Overbought

Buy when RSI crosses above 30, sell when crosses below 70:

{
"long_conditions": [
{"left": "rsi", "operator": "crosses_above", "right": "30"}
],
"short_conditions": [
{"left": "rsi", "operator": "crosses_below", "right": "70"}
],
"close_mode": "reverse"
}

2️⃣ Moving Average Crossover

Classic golden/death cross strategy:

{
"long_conditions": [
{"left": "sma_20", "operator": "crosses_above", "right": "sma_50"}
],
"short_conditions": [
{"left": "sma_20", "operator": "crosses_below", "right": "sma_50"}
],
"close_mode": "reverse"
}

3️⃣ Breakout with Volume Confirmation

Enter on breakout with high volume, let backtest handle exits:

{
"long_conditions": [
{"left": "close", "operator": ">", "right": "high[-1]"},
{"left": "volume", "operator": ">", "right": "volume_sma_20"}
],
"long_logic": "AND",
"close_mode": "none"
}

4️⃣ Multi-Timeframe Trend Following

Long when price above both 20 and 200 SMA:

{
"long_conditions": [
{"left": "close", "operator": ">", "right": "sma_20"},
{"left": "close", "operator": ">", "right": "sma_200"}
],
"long_logic": "AND",
"short_conditions": [
{"left": "close", "operator": "<", "right": "sma_20"},
{"left": "close", "operator": "<", "right": "sma_200"}
],
"short_logic": "AND"
}

5️⃣ Bollinger Band Mean Reversion

Enter at bands, exit at middle:

{
"long_conditions": [
{"left": "close", "operator": "<=", "right": "bb_lower"}
],
"close_long_conditions": [
{"left": "close", "operator": ">=", "right": "bb_middle"}
],
"short_conditions": [
{"left": "close", "operator": ">=", "right": "bb_upper"}
],
"close_short_conditions": [
{"left": "close", "operator": "<=", "right": "bb_middle"}
],
"close_mode": "conditions"
}

6️⃣ Complex Multi-Condition (Nested AND/OR)

Long when: (RSI &lt; 40 AND MACD &gt; 0) OR (Price &gt; SMA200 AND ADX &gt; 25)

{
"long_conditions": [
{
"logic": "AND",
"conditions": [
{"left": "rsi", "operator": "<", "right": "40"},
{"left": "macd", "operator": ">", "right": "0"}
]
},
{
"logic": "AND",
"conditions": [
{"left": "close", "operator": ">", "right": "sma_200"},
{"left": "adx", "operator": ">", "right": "25"}
]
}
],
"long_logic": "OR"
}

7️⃣ Candle Pattern - Bullish Engulfing

Current up candle larger than previous down candle:

{
"long_conditions": [
{
"logic": "AND",
"conditions": [
{"left": "close - open", "operator": ">", "right": "0"},
{"left": "close[-1] - open[-1]", "operator": "<", "right": "0"},
{"left": "close - open", "operator": ">", "right": "open[-1] - close[-1]"}
]
}
]
}

8️⃣ Gap Trading

Enter on gap up, exit on gap down:

{
"long_conditions": [
{"left": "open", "operator": ">", "right": "high[-1]"}
],
"close_long_conditions": [
{"left": "open", "operator": "<", "right": "low[-1]"}
],
"close_mode": "conditions"
}

9️⃣ Minimum Candle Size (Pips Filter)

Only trade candles larger than 20 pips:

{
"long_conditions": [
{"left": "high - low", "operator": ">", "right": "0.0020"},
{"left": "close - open", "operator": ">", "right": "0"}
],
"long_logic": "AND",
"short_conditions": [
{"left": "high - low", "operator": ">", "right": "0.0020"},
{"left": "close - open", "operator": "<", "right": "0"}
],
"short_logic": "AND"
}

🔟 Symbol/Text Filter

Only trade BTC pairs with bullish signal:

{
"long_conditions": [
{"left": "symbol", "operator": "contains", "right": "BTC"},
{"left": "signal_type", "operator": "==", "right": "bullish"}
],
"long_logic": "AND"
}

1️⃣1️⃣ News Headline Filter

Trade on specific news patterns:

{
"long_conditions": [
{"left": "headline", "operator": "matches", "right": "surge|rally|bullish"},
{"left": "sentiment", "operator": ">", "right": "0.5"}
],
"long_logic": "AND",
"short_conditions": [
{"left": "headline", "operator": "matches", "right": "crash|plunge|bearish"},
{"left": "sentiment", "operator": "<", "right": "-0.5"}
],
"short_logic": "AND"
}

1️⃣2️⃣ Cooldown - Max 1 Signal per Hour

Limit signal frequency:

{
"signal_mode": "cooldown",
"cooldown_seconds": 3600,
"long_conditions": [
{"left": "rsi", "operator": "<", "right": "30"}
]
}

1️⃣3️⃣ Cooldown - Max 1 Signal per 10 Bars

{
"signal_mode": "cooldown",
"cooldown_bars": 10,
"long_conditions": [
{"left": "close", "operator": ">", "right": "sma_20"}
]
}

1️⃣4️⃣ Higher Highs and Higher Lows

Trend continuation:

{
"long_conditions": [
{"left": "high", "operator": ">", "right": "high[-1]"},
{"left": "low", "operator": ">", "right": "low[-1]"}
],
"long_logic": "AND",
"short_conditions": [
{"left": "high", "operator": "<", "right": "high[-1]"},
{"left": "low", "operator": "<", "right": "low[-1]"}
],
"short_logic": "AND"
}

1️⃣5️⃣ Pyramiding - Multiple Entries

Allow adding to winning positions:

{
"allow_pyramiding": true,
"signal_mode": "cooldown",
"cooldown_bars": 5,
"long_conditions": [
{"left": "close", "operator": ">", "right": "sma_20"}
]
}

💡 Tips & Best Practices

1. Use signal_mode: first (Default)

Prevents duplicate signals when conditions stay true for multiple bars.

2. Pre-calculate Complex Indicators

For complex expressions, calculate them in an upstream worker:

  • Bad: {"left": "(close - sma_20) / atr", "operator": "&gt;", "right": "2"}
  • Good: Calculate zscore in indicator worker, then {"left": "zscore", "operator": "&gt;", "right": "2"}

3. Start Simple

Begin with one or two conditions, test, then add complexity.

4. Check Output

Use the summary output to verify signal counts make sense.

5. Use close_mode: none with Backtest

When using backtest_strategy with SL/TP, set close_mode: none to avoid conflicting exit signals.

6. crosses_above vs >

  • &gt; signals every bar where condition is true
  • crosses_above signals only on the bar where it BECOMES true

❓ Troubleshooting

No signals generated?

  1. Check time_field matches your data (datetime, time, date, timestamp)
  2. Verify condition field names exist in your data
  3. Check operator is appropriate for data type
  4. Try signal_mode: every temporarily to see if conditions ever match

Too many signals?

  1. Use signal_mode: first (default) or cooldown
  2. Add more restrictive conditions
  3. Use crosses_above/crosses_below instead of &gt;/&gt;=/&lt;&lt;/&lt;=

Signals not closing?

  1. Check close_mode is set correctly
  2. If using conditions, verify close conditions are defined
  3. Try close_mode: both for maximum flexibility