Gekko Architecture question
#1
Hey all,

   I'm new to node.JS -- but I'm an old-school seasoned C programmer, so I am slowly but surely figuring things out.

   I'm looking for a variable I can access from a strategy context that can tell me the asset, currency, and exchange we're working on.

   Thank you for your time.
  Reply
#2
You're looking for this.settings.asset, this.settings.currency and this.settings.exchange Smile

In use at line 32 of this 'strategy' I did simply to write candles to a csv. https://github.com/RJPGriffin/gekko/blob..._Export.js
  Reply
#3
hey nice share thank You!
  Reply
#4
@Gryphon
i tryed it but with gekko --ui.
no result.
Do i have to init a var ? like this one but for settings:

var config = require ('../core/util.js').getConfig();
  Reply
#5
(04-10-2018, 07:39 AM)Gryphon Wrote: You're looking for this.settings.asset, this.settings.currency and this.settings.exchange Smile

In use at line 32 of this 'strategy' I did simply to write candles to a csv. https://github.com/RJPGriffin/gekko/blob..._Export.js

Novice question but what does this function do?
  Reply
#6
The best thing to do when trying to find variables is look at what parent objects are being used then inspect them with:

console.log(config);
or
console.log(util.inspect(objectname));

This way you can find just about everything that's available Smile
  Reply
#7
(04-10-2018, 07:39 AM)Gryphon Wrote: You're looking for this.settings.asset, this.settings.currency and this.settings.exchange Smile

In use at line 32 of this 'strategy' I did simply to write candles to a csv. https://github.com/RJPGriffin/gekko/blob..._Export.js

Hey thanks for the post, the original version of that script looks quite interesting. Did you ever get it running in gekko?
  Reply
#8
Which script do you mean?
  Reply
#9
(05-23-2018, 08:53 PM)Gryphon Wrote: Which script do you mean?

https://www.tradingview.com/script/H48ye...-Trend-V2/
  Reply
#10
(05-23-2018, 08:53 PM)Gryphon Wrote: Which script do you mean?

My bad, I think I found it:
https://github.com/RJPGriffin/gekko/blob..._ADX_v2.js
  Reply


Forum Jump:


Users browsing this thread: