pine script to python
from pyine import convert
_ = convert(filename)
pine script to python
from pyine import convert
_ = convert(filename)
run pine script in python
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')
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us