Adding lots of indicators with dynamic settings - Printable Version +- Gekko Forum (https://forum.gekko.wizb.it) +-- Forum: Gekko (https://forum.gekko.wizb.it/forum-13.html) +--- Forum: Strategy Development (https://forum.gekko.wizb.it/forum-12.html) +--- Thread: Adding lots of indicators with dynamic settings (/thread-57886.html) |
Adding lots of indicators with dynamic settings - scnonah - 03-20-2019 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. RE: Adding lots of indicators with dynamic settings - scnonah - 03-25-2019 Nobody knows how to instantiate tulind indicators in the check so I can use dynamic parameters? RE: Adding lots of indicators with dynamic settings - Highwater - 04-02-2019 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. |