Anlik Trade Merkezi MA v2
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © hakanar

//@version=5
indicator("Anlik Trade Merkezi MA v2", overlay=true)


InputSource         = input.source(close, "Source", group="Moving Average")
InputSignalMA       = input.int(9, minval=1, maxval=500, title="MA Signal Line", group="Moving Average")
InputMA01           = input.int(20, minval=1, maxval=500, title="MA Line 1", group="Moving Average")
InputMA02           = input.int(50, minval=1, maxval=500, title="MA Line 2", group="Moving Average")
InputMA03           = input.int(55, minval=1, maxval=500, title="MA Line 3", group="Moving Average")
InputMA04           = input.int(100, minval=1, maxval=500, title="MA Line 4", group="Moving Average")
InputMA05           = input.int(200, minval=1, maxval=500, title="MA Line 5", group="Moving Average")
    

InputShowMALines            = input.bool(true, "Show MA Lines", group="MA Lines")
InputMATimeframe            = input.timeframe("", "MA Line Resolution", group="MA Lines")

InputMATimeframe_Security   = request.security(syminfo.tickerid, InputMATimeframe, InputSource)
InputMATimeframe_signal     = ta.sma(InputMATimeframe_Security, InputSignalMA)
InputMATimeframe_MA01       = ta.ema(InputMATimeframe_Security, InputMA01)
InputMATimeframe_MA02       = ta.sma(InputMATimeframe_Security, InputMA02)
InputMATimeframe_MA03       = ta.sma(InputMATimeframe_Security, InputMA03)
InputMATimeframe_MA04       = ta.sma(InputMATimeframe_Security, InputMA04)
InputMATimeframe_MA05       = ta.sma(InputMATimeframe_Security, InputMA05)

plot(InputShowMALines ? InputMATimeframe_signal : na, color=color.new(color.white, 0), linewidth=2, title='MASignal')
plot(InputShowMALines ? InputMATimeframe_MA01 : na, color=color.new(color.blue, 40), linewidth=2, title='MA01')
plot(InputShowMALines ? InputMATimeframe_MA02 : na, color=color.new(color.green, 40), linewidth=2, title='MA03')
plot(InputShowMALines ? InputMATimeframe_MA03 : na, color=color.new(color.green, 40), linewidth=2, title='MA03')
plot(InputShowMALines ? InputMATimeframe_MA04 : na, color=color.new(color.red, 40), linewidth=2, title='MA04')
plot(InputShowMALines ? InputMATimeframe_MA05 : na, color=color.new(color.orange, 40), linewidth=2, title='MA05')




