How multi-timeframe rules work
One alert has a single root condition. Each supported leaf rule includes its own timeframe. With an ALL rule, every leaf must match. With an ANY rule, at least one leaf must match. Nested arbitrary expression trees are not supported.
Example
This reviewed example combines an EMA 13 cross below EMA 50 on 4h with EMA 13 remaining below EMA 50 on 1h.
{
"all": [
{
"type": "crossover",
"left": {
"indicator": {
"name": "ema_13",
"category": "price_like",
"kind": "ma",
"maType": "ema",
"length": 13
},
"timeframe": "4h"
},
"right": {
"indicator": {
"name": "ema_50",
"category": "price_like",
"kind": "ma",
"maType": "ema",
"length": 50
},
"timeframe": "4h"
},
"direction": "cross_down"
},
{
"type": "value_comparison",
"left": {
"indicator": {
"name": "ema_13",
"category": "price_like",
"kind": "ma",
"maType": "ema",
"length": 13
},
"timeframe": "1h"
},
"right": {
"indicator": {
"name": "ema_50",
"category": "price_like",
"kind": "ma",
"maType": "ema",
"length": 50
},
"timeframe": "1h"
},
"timeframe": "1h",
"operator": "<"
}
]
}