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
#2
Nobody knows how to instantiate tulind indicators in the check so I can use dynamic parameters?
  Reply
#3
You can create your own indicators in gekko.
Then feed your tulind indicator results to those indicators, then use the results of gekko indicators in you check function.
  Reply


Forum Jump:


Users browsing this thread: