Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

2 indicators with different time intervals / buy at price #1075

Closed
AlfredoBB opened this issue Sep 3, 2017 · 2 comments
Closed

2 indicators with different time intervals / buy at price #1075

AlfredoBB opened this issue Sep 3, 2017 · 2 comments

Comments

@AlfredoBB
Copy link

Note: for support questions, please join our Discord server

Thank you very much for this amazing program.
I have 2 Feature Requests / 1 bug?

I'm writing a custom bot combining indicators.
I'd like to 5 min MACD, 15 min MACD and 60 min MACD; since all of these provide different information.
However the program doesn't allow me do this.
I can tell it "create candles every 5 minutes", then I use a counter to create the 15 and the 60 min candles.
However I'm not able to apply the AddIndicator function or the Talib to it. (maybe an AddIndicator or Talib function that accepted an user-customized array of candles?)

Secondly, it would be interesting that the advice('') function (long/short) accepted a second parameter ("notes"). I pass the indicator that triggered the trade activation and when I go through the trades table, I can see which indicators triggered successful trades and which ones didn't.

Finally, I've noticed the only way to pass the settings parameter variable is creating an object through the init() function in user-customized programs... It doesn't accept it from the interface... I'm still testing this.

Thank you very much again.
Alfredo.

@askmike
Copy link
Owner

askmike commented Sep 3, 2017

Hey @AlfredoBB!

Finally, I've noticed the only way to pass the settings parameter variable is creating an object through the init() function in user-customized programs... It doesn't accept it from the interface... I'm still testing this.

The current configuration is all over the place, if you want to create a stratety that has a parameter blob which you want to set in the UI you need to:

And now it shows up in the UI :) This is definitely not ideal, and there is a proposal to improve the configuration (for both the UI and the CLI mode), see #956 for details.

I'm writing a custom bot combining indicators. I'd like to 5 min MACD, 15 min MACD and 60 min MACD; since all of these provide different information.

This has been asked a lot and the current answer is:

The addIndicator method is just a helper function that actually does a few things under the hood:

  • register an indicator object to this.indicators for easy access.
  • whenever there is new market data (=when there are new candles) pump them into the indicator.

If you want more complex functionality, like different indicators on different intervals the best way right now is to just calculate them yourself: in your strat's update function you can update them yourself (every Nth candle for example).

The reason why this is not part of the addIndicator method is because it adds to much complexity for this function as well as figuring out when all the indicators have updated and a user might want to run the check function (what if a user registers one indicator at 7 min candles and one at 8 min candles? When does he expect the check function to run?

This question is a dup of #868.


Secondly, it would be interesting that the advice('') function (long/short) accepted a second parameter ("notes"). I pass the indicator that triggered the trade activation and when I go through the trades table, I can see which indicators triggered successful trades and which ones didn't.

This is quite specific, but you are more than welcome to add a PR for this :)

@askmike
Copy link
Owner

askmike commented Sep 4, 2017

I am closing this, because the main issues are dups! Feel free to keep the conversation going :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants