Git Product home page Git Product logo

freqtrade_public's Introduction

Indicators, Freqtrade strategies, improvements on existing strategies, helper scripts:

This is a repo of any ideas I've had about trading strategy that I deem original to the Freqtrade package/platform, or improvements upon existing scripts.

Fear and Greed Index (FGI):

Notes:

In order to use this, you must manually download historical FGI data for the db (see example below).

I've written bots for trading for several years, and I think the biggest losses occur when trading is out of touch with the world outside of the strategy itself, i.e. data gathered from only the technical indicators operate in a vacuum. The Fear and Greed Indicator, though it is flawed in several ways as a reliable indicator, still has some information that I think is valuable, specifically a 'sentiment' indication, partially weighted by user surveys which I think is extremely unique and difficult to find without directed effort or funding.

So, the most interesting indicator I have on here is the Fear and Greed Index daily controller. I've done some hyperopting with this and found that actually, it is useful as a shitcoin loss-protection device.

  • FGI.py will give you a simple daily indicator that takes data from the maintainers of the actual FGI. You can't backtest this.

  • FGITest.py will give you the backtestable FGI indicator which uses all the stored data for testing.

The only other indicator I'd like to try is a Twitter (presently 'X') sentiment indicator, which shouldn't be too difficult but will take some time to implement.

I find that simply using the Bitcoin Daily FGI > 85 or < 20 works great as a power on/off switch for your alt-coin trading bots, because most poeple will dump when Bitcoin looks weak.

Conversely, it's always a good idea to get out early by turning off the bots when Bitcoin greed gets super insane. Most strategies have difficulty pinpointing a cliff-edge, while it's generally clear to human observers, so the greed index works quite well when extreme greed hits, and you turn off your bots.

Example:

Step 1: If you want to backtest anything, you need a database. FGIDatabase.py calls that FGI data for you and puts it in a .csv file. The data is called from alternative.me, who are the original authors of the Bitcoin Fear and Greed Index, which calls data from inflows, outflows, and among other things user surveys.

Step 2: In the example FGIHMABTCCtrl.py the FGI indicator and database call is integrated into the sample HMA offset strategy, controlling the bot using BTC Fear and Greed Index on the 1D timeframe by adding an infomrative timeframe column with the indicator, adding the FGI dailiy data to it, and then controlling the populate_buy/sell_trend functions.

FGI Guard:

Turns the bot on/off at FGI specified level.

FGI Cut:

There's also a 'stoploss' style instant sell for any in-process trades at somewhere near 90. It makes sense and tests well to minimuse losses.

Position Adjustment Backtest Improvements:

DCAFREQ:

I wrote a position adjustment strategy (sometimes incorrectly referred to as 'DCA') that inherits a given parent strategy, which simulates a full order book before allowing trades to open.

The reason I did this is because backtest results were wildly optimistic because the hyperopt could seriously over-commit the order book, or make it so that a single trade opened with the rest of the position_adjustment trades far below 100% of the price range.

DCA_Calculators

Plug in your preferred settings and your simulated trade numbers, and see what your spread looks like. Very simple but I didn't find a shake and bake solution so I made my own. Let me know if you like it!

Donations:

Donations:

Bitcoin: bc1q2s096sa6h63uqqlqu68g62xa8hqkasj9jrthqw

ERC20: 0xd4268778C7a462FDa525DaB2A113CcFe46fabdE2

freqtrade_public's People

Contributors

sshimaninja avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.