Advice Event Trigger field?
#1
Currently the documentation states that this is always "trailingStop". Is there a way to write info to this?

I was looking at how I could get a message from the strategy to an event as when a strategy is running multiple indicators and stop loss/take profit it would be nice to know what has triggered the current advice. Obviously I'm not the only one to think this as there is a field for it... Is it possible to yet?

I was thinking something like this:
Code:
// this.advice('advice', 'optional message');
this.advice('short', `${takeProfitPercent}% Take Profit Triggered`);

Thanks.
  Reply
#2
The only purpose of the advice method (and all other events within Gekko) is to relay information from one plugin to another. So my question is: what do you want to do with the information you pass? If you simply want to log (to CLI or log file) you can simply use console.log.

-----

If you want to pass it to other plugins (advanced usage): For that I recommend using a different event called stratNotification:

https://gekko.wizb.it/docs/internals/eve...tion-event

in your strategy you can do:

Code:
this.notify("whatever you want")

And you plugins can subscribe to the stratNotification event to receive it Smile
  Reply
#3
I wanted to pass a message from the strategy to a plugin - I'd missed the stratNotification, that's perfect. Thanks.
  Reply
#4
Your post has those facts which are not accessible from anywhere else. It’s my humble request to u please keep writing such remarkable articles TestoPrime
  Reply
#5
Thanks for your insight for your fantastic posting. I’m exhilarated I have taken the time to see this. It is not enough; I will visit your site every day. 토토사이트
  Reply
#6
I definitely enjoying every little bit of it. It is a great website and nice share. I want to thank you. Good job! You guys do a great blog, and have some great contents. Keep up the good work. 먹튀검증업체
  Reply
#7
This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. 토토사이트
  Reply
#8
I am unable to read articles online very often, but I’m glad I did today. This is very well written and your points are well-expressed. Please, don’t ever stop writing. 꽁머니 홍보방
  Reply
#9
Hi there, I found your blog via Google while searching for such kinda informative post and your post looks very interesting for me. Onewheel Pint Accessories
  Reply
#10
This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. Onewheel Accessory
  Reply


Forum Jump:


Users browsing this thread: