Listening for trade events in strategy ?
#1
Hello,
how am I supposed to register handler for `tradeInitialized`, `tradeCompleted`... events within my strategy file?
I have tried this.on('tradeInitialized', <callback>) and this.addListener('tradeInitialized', <callback>) but nothing gets ever called, I have console.log() in the callback function but it never writes to console. 
Thx for any advice
  Reply
#2
Hey! Within Gekko there are plugins: these are the main internal modules. Information is shared between them via events.

Note that your strategy is not a plugin (but it's wrapped inside a plugin). The plugins & event system is used internally as well as for external "plugins" (telegram bot, etc).

----

That said: the tradeCompleted event is exposed to your strategy. You can create a function called onTrade which will receive the tradeCompleted event. If you need more events let me know and we figure out a clean interface for that.
  Reply
#3
<form debug test>
  Reply
#4
Particular interviews furnish firsthand message on mart size, industry trends, ontogeny trends, capitalist landscape and outlook, etc. 토토사이트
  Reply
#5
Wow, cool post. I’d like to write like this too – taking time and real hard work to make a great article… but I put things off too much and never seem to get started. Thanks though. 먹튀
  Reply


Forum Jump:


Users browsing this thread: