Gekko Forum
Gekko Architecture question - 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: Gekko Architecture question (/thread-56698.html)

Pages: 1 2


Gekko Architecture question - docdrow - 04-09-2018

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.


RE: Gekko Architecture question - Gryphon - 04-10-2018

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/develop/strategies/CSV_Export.js


RE: Gekko Architecture question - susitronix - 04-24-2018

hey nice share thank You!


RE: Gekko Architecture question - susitronix - 04-27-2018

@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();


RE: Gekko Architecture question - Kris191 - 04-27-2018

(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/develop/strategies/CSV_Export.js

Novice question but what does this function do?


RE: Gekko Architecture question - thegamecat - 04-28-2018

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


RE: Gekko Architecture question - hasitt - 05-23-2018

(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/develop/strategies/CSV_Export.js

Hey thanks for the post, the original version of that script looks quite interesting. Did you ever get it running in gekko?


RE: Gekko Architecture question - Gryphon - 05-23-2018

Which script do you mean?


RE: Gekko Architecture question - hasitt - 05-25-2018

(05-23-2018, 08:53 PM)Gryphon Wrote: Which script do you mean?

https://www.tradingview.com/script/H48yeyRa-Adaptive-ATR-ADX-Trend-V2/


RE: Gekko Architecture question - hasitt - 05-25-2018

(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/develop/strategies/ATR_ADX_v2.js