[Beginner] Undefined
#2
Hey! Both of these problems are because of you logging a non existing variable.

Unfortunately open source Gekko requires you to build strategies in javascript, here are your two ways forward:

- Try to get a better understanding of javascript, I recommend a course like https://www.codecademy.com/
- Check out my new project called Gekko Plus: https://www.youtube.com/watch?v=AFyU16l6Q6c - this doesn't require you to write javascript files.

----

If you want to go ahead and javascript, these are your issues:

Code:
var result = this.indicators.mynativemacd.result;
console.log(this.indicator);

You just created a variable called result, so log that instead:

Code:
console.log(result)

And:

Code:
const ema10 = this.tulipIndicator.ema10.result.result;
const ema21 = this.tulipIndicator.ema21.result.result;

You are missing an "s" behind "tulipIndicator". See the docs: https://gekko.wizb.it/docs/strategies/tu...ators.html
  Reply


Messages In This Thread
[Beginner] Undefined - by Rabberzzz - 10-20-2018, 05:00 PM
RE: [Beginner] Undefined - by askmike - 10-21-2018, 04:23 AM

Forum Jump:


Users browsing this thread: