You can create indicators that analyze multiple timeframes:
Copy
# Fetch data from multiple timeframesh1_bars = get_bars("EURUSD", 60, limit=100)h4_bars = get_bars("EURUSD", 240, limit=100)d1_bars = get_bars("EURUSD", 1440, limit=100)# Find confluenceh1_trend = calculate_trend(h1_bars)h4_trend = calculate_trend(h4_bars)d1_trend = calculate_trend(d1_bars)# Generate signal only when all alignif h1_trend == h4_trend == d1_trend: generate_signal(...)
When using multi-timeframe analysis, submit your indicator to the lowest timeframe you analyzed. This ensures signals appear on the most detailed chart.
Always use the time field from the /bars response when creating indicators. Don’t calculate timestamps manually as they may not align with actual bars.