OPEN-SOURCE SCRIPT
dual moving average crossover Erdal

//version=5
indicator("MA Cross Simple", overlay=true)
// Inputs
fastLen = input.int(10)
slowLen = input.int(100)
// Moving averages
fastMA = ta.sma(close, fastLen)
slowMA = ta.sma(close, slowLen)
// Plot
plot(fastMA, color=color.green)
plot(slowMA, color=color.red)
// Cross signals
bull = ta.crossover(fastMA, slowMA)
bear = ta.crossunder(fastMA, slowMA)
// Labels
if bull
label.new(bar_index, low, "BUY", style=label.style_label_up, color=color.green)
if bear
label.new(bar_index, high, "SELL", style=label.style_label_down, color=color.red)
indicator("MA Cross Simple", overlay=true)
// Inputs
fastLen = input.int(10)
slowLen = input.int(100)
// Moving averages
fastMA = ta.sma(close, fastLen)
slowMA = ta.sma(close, slowLen)
// Plot
plot(fastMA, color=color.green)
plot(slowMA, color=color.red)
// Cross signals
bull = ta.crossover(fastMA, slowMA)
bear = ta.crossunder(fastMA, slowMA)
// Labels
if bull
label.new(bar_index, low, "BUY", style=label.style_label_up, color=color.green)
if bear
label.new(bar_index, high, "SELL", style=label.style_label_down, color=color.red)
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.