Attachments forums

List of attachments posted on this forum.


All files on forums: 164397

Re: MT4 Indicator requests and ideas

uncle wong, Mon Oct 07, 2024 8:21 am

Hello MrTools ,

Is it possible to convert the below Tradingwview indicator into mql4 ?
Here is the explanation and the code:

So i had the idea of averaging the input and the output of the respective close/open/high and low price using a recursive exponential window functions, each values will be closer to their true value if they are volatile, if they are not then those values will look smoother, the length input represents the reactivity of the candles, high values represents smoother results but less reactive.The goal of those candles is to make all the information easier to interpret by a trader.500 input length, the price look smoother, supports and resistances are easier to make.

Code: Select all

//@version=2
study("Retrospective Candlestick Chart",overlay=true)
length = input(100)
//
s(x) =>
    s = stoch(x,x,x,length)/100
//
weight = s(abs(change(close)))
c = weight * close + (1-weight) * nz(c[1],close)
h = weight * high + (1-weight) * nz(c[1],high)
l = weight * low + (1-weight) * nz(c[1],low)
o = weight * open + (1-weight) * nz(c[1],open)
k = (c+h+l+o)/4
//
plotcandle(k[1],h,l,k,color=k > k[1] ? #2E9AFE : red)
plot(k,title="Value",color=na,editable=false)

All files in topic