Multi-Timeframe Analysis¶
Analyze multiple timeframes simultaneously for better trade timing.
Setup¶
Trend Alignment¶
alignment = mta.trend_alignment
# {
# daily: :up,
# weekly: :up,
# monthly: :up,
# aligned: true,
# direction: :bullish
# }
if alignment[:aligned] && alignment[:direction] == :bullish
puts "Strong uptrend across all timeframes"
end
Multi-Timeframe Signal¶
# Higher timeframe = trend, lower timeframe = timing
signal = mta.signal(
strategy_class: SQA::Strategy::RSI,
higher_timeframe: :weekly, # Trend filter
lower_timeframe: :daily # Entry timing
)
# Only takes trades aligned with higher timeframe trend
Support/Resistance¶
# Find levels that appear across multiple timeframes
levels = mta.support_resistance(tolerance: 0.02)
levels.each do |level|
puts "Strong level at #{level[:price]}"
puts " Appears in: #{level[:timeframes].join(', ')}"
end