//version=5 indicator("Custom MA Crossover (1-10min)", overlay=true, shorttitle="CMA Cross 1-10min")
// Inputs fast_length = input.int(5, title="Fast MA Length", minval=1) // Adjusted for shorter timeframes slow_length = input.int(14, title="Slow MA Length", minval=1) // Adjusted for shorter timeframes ma_type = input.string(title="MA Type", options=["SMA", "EMA"], defval="EMA") use_timeframe_filter = input.bool(true, title="Restrict to 1-10min Timeframes?") volume_filter = input.bool(true, title="Use Volume Filter?") min_volume = input.float(1.5, title="Minimum Volume Multiplier", step=0.1) // Filter for higher volume candles
// Timeframe Check is_allowed_timeframe = (timeframe.isminutes and timeframe.multiplier >= 1 and timeframe.multiplier <= 10) or not use_timeframe_filter
// Crossover signals with filters bullish = ta.crossover(fast_ma, slow_ma) and is_allowed_timeframe and (not volume_filter or is_high_volume) bearish = ta.crossunder(fast_ma, slow_ma) and is_allowed_timeframe and (not volume_filter or is_high_volume)
// Alerts alertcondition(bullish, title="Bullish Crossover", message="Fast MA crossed above Slow MA on a 1-10min chart") alertcondition(bearish, title="Bearish Crossover", message="Fast MA crossed below Slow MA on a 1-10min chart")
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publications is governed by House rules. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.
هل تريد استخدام هذا النص البرمجي على الرسم البياني؟
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.