Re: MT4 Indicator requests and ideas

15036
constbln wrote: Thu Mar 03, 2022 1:25 am Hello Im looking for an ATR Crossover indicator. Unfortunately when I plot 2 Atr´s on my mt4 the scale is not fixed; so the crossovers vary when I zoom in/out.
Can one of the coders on forexstation help me out?

thanks in advance

I attached a picture from tradingview
Image
Looks like both are Atr's of RMA, any chance you could post the code.

Re: MT4 Indicator requests and ideas

15037
Hi Mr. Tools and Coders,

This LargeTimeframe indicator is a wonderful tool. However, I would like to know if an option for the candle's shadow (true/false) and a on/off button like the other attached indicator can be added.

The Candle Overlay BT indicator is ok, but it is not in alignment with the period separators on the weekly. And when you use the shift option, the previous candles are out of alignment. Or if the Candle Overlay BT can be fixed, that would be awesome!

Thanks in advance for your consideration!!!!!!

Re: MT4 Indicator requests and ideas

15038
mrtools wrote: Thu Mar 03, 2022 4:33 am Looks like both are Atr's of RMA, any chance you could post the code.

Code: Select all

adx indicator
indicator(title="Average True Range", shorttitle="ATR", overlay=false, timeframe="", timeframe_gaps=true)
length = input.int(title="Length", defval=14, minval=1)
smoothing = input.string(title="Smoothing", defval="RMA", options=["RMA", "SMA", "EMA", "WMA"])
ma_function(source, length) =>
	switch smoothing
		"RMA" => ta.rma(source, length)
		"SMA" => ta.sma(source, length)
		"EMA" => ta.ema(source, length)
		=> ta.wma(source, length)
plot(ma_function(ta.tr(true), length), title = "ATR", color=color.new(#B71C1C, 0))
------------------------------------------------------------------------------------------------
but as you re looking for the rma I think you will find the tradingview code here
https://stackoverflow.com/questions/480 ... internally (I think you understand it better than I do)


--------------------------------------
please let me know if u need anything else
Attachments


Who is online

Users browsing this forum: Google [Bot], PaperLi [Bot], SijjiN, TEAMTRADER, Tur005, twix, Yandex [Bot] and 117 guests