Re: Already Converted TradingView Indicators to MT4 Indicators

251
Hello my friends!

Within my research, I found an approach that can be useful for anyone who operates indexes. My idea was to use the ATR support/resistance basis as a "filter" to consider valid entries.

I didn't find something similar in MT4, but I found this code in Tradingview and this image in Thinkscript. And if you allow me the insight, I don't know if there is the possibility of creating this indicator in MTF for example. A practical example would be to assess when a stock/index is outside its average price. or even "cheap".

Code: Select all

//@version=3
study("ATR Grid from daily", overlay=true, shorttitle="ATRGrid")
lvl1 = 0.5, lvl2 = 0.7, daily_atr_len = 15

atr_func = atr(daily_atr_len)
day_atr = security(tickerid, 'D', atr_func)
day_close = security(tickerid, 'D', close)

p1 = plot(day_close + day_atr, color=red)
p07 = plot(day_close + day_atr * lvl2, color=orange)
fill(p1, p07, color = orange)
p05 = plot(day_close + day_atr * lvl1, color=yellow)
fill(p07, p05, color = yellow)
m05 = plot(day_close - day_atr * lvl1, color=yellow)
// fill(m05, p05, color = green)
m07 = plot(day_close - day_atr * lvl2, color=orange)
fill(m07, m05, color = yellow)
m1 = plot(day_close - day_atr, color=red)
fill(m1, m07, color = orange)
tks a lot in advance
Attachments
These users thanked the author RodrigoRT7 for the post:
Chickenspicy


Re: Already Converted TradingView Indicators to MT4 Indicators

253
If there ever was a Renko Rsi it should use this Atr calc. Instead
Jimmy wrote: Wed Apr 29, 2020 10:27 pm I'm not sure if this one has already been shared by our members but here is another nice new code from Mladen which I think would be very useful for traders is his Adaptive ATR for MT4.

Thanks to Mladen for creating some valuable tools for the older platform and also releasing the source codes :)

As explained by Mladen:
This is an adaptive ATR for metatrader 4.

Apart from being adaptive, there is one more deviation in it - it is calculating average range (not average true range). The difference is subtle but it exists. It means that unlike the average true range (that checks if there was a gap when compared to previous bar), this indicator is calculating average range of high to low. And that is it. It is, as it is obvious from previous description, "ignoring" the gaps and that way it is calculating only the "effective" ranges.
Image
These users thanked the author Chickenspicy for the post (total 2):
Jimmy, RodrigoRT7
0 + 0 = 0
Infinite / Infinite = 1
1 way to Heaven & it matters

Re: Already Converted TradingView Indicators to MT4 Indicators

255
nwesterhuijs wrote: Fri Feb 03, 2023 4:12 am Aimed to convert the following:

https://www.tradingview.com/script/Et6Y ... Index-LUX/
-------------------------------------------------------------------------------------------------------------
Description
"The Squeeze Index aims to measure the action of price being squeezed, and is expressed as a percentage, with higher values suggesting prices are subject to a higher degree of compression.

Settings
Convergence Factor: Convergence factor of exponential envelopes .
Length: Period of the indicator.
Src: Source input of the indicator.

Usage
Prices being squeezed refer to the action of price being compressed within a tightening area. Prices in a tight area logically indicate a period of stationarity, price breaking out of this area will generally indicate the trader whether to buy or sell depending on the breakout direction."
-------------------------------------------------------------------------------------------------------------

Image


And it looks like all is fine:
Image


It works with both fixed level and Anchored DSL, but there seems to be an issue with the non-anchored DSL that I cannot seem to resolve. Anybody has a clue where I might need to look. I added non-anchored DSL to a number of indies. but this one seems to elude me.
MTF causes MT to crash




Who is online

Users browsing this forum: Antonov, ChatGPT [Bot], Efegocmen, jjventural, Nanyuki, ssscary and 107 guests