Adding lots of indicators with dynamic settings
#1
Hello. This is my first post here. I found a nice strat on trading view that I want to convert from pine script. The problem is the way the define and use different indicators, i'm finding it hard to recreate this strat in gekko and tulind. I know gekko has the addIndicator and addTuIndicator (spelling from memory), but they are required to be created in the init function. But the script I'm converting uses some of the indicator results as parameters for other indicator instantiations.

For example something like below.

//SRSI
smoothK = 3
smoothD = 3
lengthRSI = 9
lengthStoch = 9
rsi1 = rsi(price, lengthRSI)
k = sma(stoch(rsi1, rsi1, rsi1, lengthStoch), smoothK)
d = sma(k, smoothD)

//DEMA TEMA
e1 = ema(price, 9)
e2 = ema(e1, 9)
ema1 = ema(price, 9)
ema2 = ema(ema1, 9)
ema3 = ema(ema2, 9)
tema = 3 * (ema1 - ema2) + ema3
dema = 2 * e1 - e2
avda = avg(dema,tema)

Whats the best way to instantiate many tulind indicators?

Please let me know if you need more details.
  Reply


Messages In This Thread
Adding lots of indicators with dynamic settings - by scnonah - 03-20-2019, 02:28 AM

Forum Jump:


Users browsing this thread: