Advice Event Trigger field?
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:
// this.advice('advice', 'optional message');
this.advice('short', `${takeProfitPercent}% Take Profit Triggered`);

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:

in your strategy you can do:

this.notify("whatever you want")

And you plugins can subscribe to the stratNotification event to receive it Smile
I wanted to pass a message from the strategy to a plugin - I'd missed the stratNotification, that's perfect. Thanks.

Forum Jump:

Users browsing this thread: