Stochastics over Heiken Ashi candles - 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: Stochastics over Heiken Ashi candles (/thread-56811.html) |
Stochastics over Heiken Ashi candles - niquedegraaff - 04-17-2018 Hi, I already implemented Heiken Ashi candles in my strategy, but now I want to have a stochastics indicator running on those heiken ashi candles. How can I do that? The input candle/price is hard coded inside the indicators. I can't send my own (Heiken Ashi) HOCL data to the indicator do I? RE: Stochastics over Heiken Ashi candles - niquedegraaff - 04-18-2018 (04-17-2018, 10:00 AM)niquedegraaff Wrote: Hi, No one that can help me in the right direction here? How do I run my own custom heiken candle data through a Indicator? RE: Stochastics over Heiken Ashi candles - Gryphon - 04-18-2018 Add the indicator as a require: Code: var myInd = require(./indicators/myInd.js); Then add it as: Code: this.myIndicator = new myInd(myParameters); Gekko won't automatically update this, so in the update block you need to call update, with your HA candle instead of the normal candle: Code: this.myIndicator.update(myHACandle); RE: Stochastics over Heiken Ashi candles - niquedegraaff - 04-21-2018 Thanks, but I still encounter some problems with this. The SMA indicator (i want smoothed K and D over stochRSI) is returning NaN results. I don't see where the problem is. The input is good (Input Price) but the SMA Indicator seems to have problems calculating it. Code: // Prepare everything our method needs Result (limited to 2 results for readability): Code: 2018-04-21 09:36:45 (DEBUG): Input price: 100 |