Attachments forums

List of attachments posted on this forum.


All files on forums: 136706

Re: Already Converted TradingView Indicators to MT4 Indicators

Greg82, Sat Mar 11, 2023 11:18 pm

Hi

Can You help me and :

_ convert to MT4
_ add SMMA
_ add MTF
_ add button ON / OFF


Code: Select all

indicator(title='Kanały średnich', overlay=true, timeframe="")

short = input(33, "Wartość short")
long = input(144, "Wartość long")

srednia(src, length, type) =>
    switch type
        "RMA" => ta.rma(src, length)
        "EMA" => ta.ema(src, length)
        "SMA" => ta.sma(src, length)
        "WMA" => ta.wma(src, length)
        "VWMA" => ta.vwma(src, length)

metoda = input.string(title = "Metoda liczenia średniej", defval = "RMA", options=["RMA", "EMA", "SMA", "WMA", "VWMA"])

shortl = srednia(low, short, metoda)
shorth = srednia(high, short, metoda)
longl = srednia(low, long, metoda)
longh = srednia(high, long, metoda)

plot(shortl, color=color.new(color.aqua, 0), linewidth=1, title="Short low")   // Low 33
plot(shorth, color=color.new(color.aqua, 0), linewidth=1, title="Short high")  // High 33
plot(longl, color=color.new(color.red, 0), linewidth=1, title="Long low")      // Low 144      
plot(longh, color=color.new(color.red, 0), linewidth=1, title="Long high")     // High 144
These are simple averages and the code is open source.

Thx and regards

Greg
All files in topic