script de pin à python
haOpen = 0.0
haOpen := (src + nz(haOpen[1])) / 2
Uptight Unicorn
haOpen = 0.0
haOpen := (src + nz(haOpen[1])) / 2
up = change(high)
swr1 = input(true, title='RSI')
src1 = ohlc4
len1 = input.int(3, minval=1, title='Length RSI')
srs1 = input.int(2, minval=1, title='Length Sma RSI')
up = ta.rma(math.max(ta.change(osc2), 0), len1)
down = ta.rma(-math.min(ta.change(osc2), 0), len1)
rsi = down == 30 ? 100 : up == 30 ? 30 : 100 - 100 / (1 + up / down)
mr = ta.sma(rsi, srs1)
emamr = ta.ema(mr,7)
p = rsi >= mr ? color.green : color.red
//BB
STD = ta.stdev(mr,srs1)
SMA = ta.sma(mr,srs1)
upper = SMA+(STD*2)
lower = SMA-(STD*2)
//end BB
last4h = ta.highest(mr, 4)
lastl4 = ta.lowest(mr, 4)
last8h = ta.highest(mr, 8)
lastl8 = ta.lowest(mr, 8)
middle = (last4h+lastl4)/2
middle1 = (last8h+lastl8)/2
plot(last4h,title="last4h", color=color.yellow, linewidth=2)
plot(lastl4,title="lastl4", color=color.yellow, linewidth=2)
plot(last8h,title="last8h", color=color.red, linewidth=2)
plot(lastl8,title="lastl8", color=color.green, linewidth=2)
plot(SMA,color =color.green, title='SMA')
sdsffdsfs
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © veryfid
//@version=4
study(title = "ZLSMA - Zero Lag LSMA", shorttitle="ZLSMA", overlay=true, resolution="")
length = input(title="Length", type=input.integer, defval=32)
offset = input(title="Offset", type=input.integer, defval=0)
src = input(close, title="Source")
lsma = linreg(src, length, offset)
lsma2 = linreg(lsma, length, offset)
eq= lsma-lsma2
zlsma = lsma+eq
plot(zlsma, color=color.yellow, linewidth=3)
from pyine import convert
_ = convert(filename)