Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UserPairlist handler to manage "Manual" pairlists #4493

Open
xmatthias opened this issue Mar 6, 2021 · 3 comments
Open

UserPairlist handler to manage "Manual" pairlists #4493

xmatthias opened this issue Mar 6, 2021 · 3 comments
Labels
Enhancement Enhancements to the bot. Get lower priority than bugs by default. Pairlist Issues / PR's related to Pairlists / pairlist handling

Comments

@xmatthias
Copy link
Member

xmatthias commented Mar 6, 2021

Describe the enhancement

we could have a UserPairlist (name to define - this one is probably not good) pairlist, which will either provide a full pairlist (simliar to staticpairlist) - or inject additional pairs to the pairlist.

This UserPairlist get's the pairlist from a (new) database table - allowing full control to RPC by adding and removing pairs from this userpairlist at will (it's empty by default, but persisted across restarts by beeing in the database).

as the pairlist is refreshed quite often (once every iteration, unless the pairlist implements some caching) - users could simply add / remove your pair, and it'd magically appear without changing configuration or whatever.

obviously blacklist (and such) will still apply as usual, so you can't whitelist pairs that are in a blacklist - but that shouldn't really be a problem i'd hope.

It can act as both a "generator" (first position of the pairlists) - or as filter (which will add the pairs in it's list).

@xmatthias xmatthias added Enhancement Enhancements to the bot. Get lower priority than bugs by default. Pairlist Issues / PR's related to Pairlists / pairlist handling labels Mar 6, 2021
@aiforinvesting
Copy link

aiforinvesting commented Apr 13, 2021

@xmatthias
How come this does not work; providing all USDT pairs in the whitelist of config.json. and populating indicator is the default RSI.

def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
    """
    Based on TA indicators, populates the buy signal for the given dataframe
    :param dataframe: DataFrame populated with indicators
    :param metadata: Additional information, like the currently traded pair
    :return: DataFrame with buy column
    """
    tickers = []
    with open('tickers.txt', 'r') as filehandle:
        for line in filehandle:
            # remove linebreak which is the last character of the string
            ticker = line[:-1]
            # add item to the list
            tickers.append(ticker)

    dataframe.loc[
        (
            # Signal: RSI 
            (dataframe['rsi'] > 0)  &
            (metadata['pair'] in tickers)
        ),
        'buy'] = 1

    return dataframe

@xmatthias
Copy link
Member Author

xmatthias commented Apr 13, 2021

I guess this approach could work (assuming you have no bugs) - but it's not what this issue is about, but about providing a way to manage the pairlist "online" - either via API or via telegram.

Investigating why your code will or will not is however clearly not part of this issue.

@epigramx
Copy link
Contributor

epigramx commented May 9, 2021

The dream would be to have full (and easy) programmatic freedom. But I wonder if a good first version is an EditPairList that can be set at the end of the chain and it has only three string settings: append; prepend and remove.
So for example after one uses all the current filters as normal at the end it would have "remove these pairs" or/and "append these pairs" and/or "prepend these pairs".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Enhancements to the bot. Get lower priority than bugs by default. Pairlist Issues / PR's related to Pairlists / pairlist handling
Projects
None yet
Development

No branches or pull requests

3 participants