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

InformativeSample Strat #67

Closed
Prossi79 opened this issue Feb 9, 2020 · 5 comments
Closed

InformativeSample Strat #67

Prossi79 opened this issue Feb 9, 2020 · 5 comments

Comments

@Prossi79
Copy link

Prossi79 commented Feb 9, 2020

For requestion a new strategy. Please use the template below.
Any strategy request that does not follow the template will be closed.

Tried to backtest the Informative Sample Strat "out of the box" to get familiar with the concept of informative pairs. Anything I need to adjust or consider?

Following error message:

2020-02-09 13:13:22,569 - freqtrade - ERROR - Fatal exception!
Traceback (most recent call last):
  File "/home/andreas/freqtrade/freqtrade/main.py", line 36, in main
    return_code = args['func'](args)
  File "/home/andreas/freqtrade/freqtrade/commands/optimize_commands.py", line 44, in start_backtesting
    backtesting.start()
  File "/home/andreas/freqtrade/freqtrade/optimize/backtesting.py", line 396, in start
    preprocessed = self.strategy.tickerdata_to_dataframe(data)
  File "/home/andreas/freqtrade/freqtrade/strategy/interface.py", line 448, in tickerdata_to_dataframe
    for pair, pair_data in tickerdata.items()}
  File "/home/andreas/freqtrade/freqtrade/strategy/interface.py", line 448, in <dictcomp>
    for pair, pair_data in tickerdata.items()}
  File "/home/andreas/freqtrade/freqtrade/strategy/interface.py", line 464, in advise_indicators
    return self.populate_indicators(dataframe, metadata)
  File "/home/andreas/freqtrade/user_data/strategies/InformativeSample.py", line 102, in populate_indicators
    ticker_interval=self.ticker_interval)
TypeError: historic_ohlcv() got an unexpected keyword argument 'ticker_interval'
@xmatthias
Copy link
Member

xmatthias commented Feb 9, 2020

the only place this may come from is the below - but that's been changed a while ago so make sure to use the latest version of freqtrade (2020.01 or later) and update this repository (git pull).

data = self.dp.get_pair_dataframe(pair=f"{self.stake_currency}/USDT",
timeframe=self.ticker_interval)

Now i would not encourage you to run this strategy - it's VERY basic and is just there to prove the point - not necessarily to be used to make gains.

@Prossi79
Copy link
Author

Prossi79 commented Feb 9, 2020

:) yes, just to understand the informative pair topic which I like to implement in one of my strategies

@Prossi79
Copy link
Author

Prossi79 commented Feb 9, 2020

Another quick question:

this part of the strategy file I need to change?

    def informative_pairs(self):
        """
        Define additional, informative pair/interval combinations to be cached from the exchange.
        These pair/interval combinations are non-tradeable, unless they are part
        of the whitelist as well.
        For more information, please consult the documentation
        :return: List of tuples in the format (pair, interval)
            Sample: return [("ETH/USDT", "5m"),
                            ("BTC/USDT", "15m"),
                            ]
        """
        return [(f"{self.config['stake_currency']}/USDT", self.ticker_interval)]

to for example:

return [("ETH/USDT", "5m")]

@xmatthias
Copy link
Member

well you can, then it'll use 5m tickers for that "informative" pair.

the example (return [(f"{self.config['stake_currency']}/USDT", self.ticker_interval)]) uses the same interval the strategy uses.

That means for backtesting for example - you can run freqtrade backtesting --strategy InformativeSample -i 1h - and it'll automatically use the 1h ticker of "BTC/USDT".

In your case, it would always use 5m for the informative pair. That means when combining the tickers, you need to be careful so the data is actually matching.

@Prossi79
Copy link
Author

Prossi79 commented Feb 9, 2020

mmmh okay, my intention / idea was the following -> using BTC/USDT long time frame (e.g. 1d) as informative pair to get an idea in what direction the market is going (BTC as pull) - for example via EMA50 based on 1d BTC/USDT informative pair. This information I like to use as guard for my 15m strategy which is using 15m data for triggers & guards. With this strategy I like to trade Altcoins.

Is the InformativePair approach viable for this concept? Or better using re-sampling?

And how would I need to adapt the your strategy template? my stake currency is USDT, I like to have as informative pair BTC/USDT and want to trade lets say XRP/USDT

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

No branches or pull requests

2 participants