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

New strategy based in indicators #327

Closed
thesam1545 opened this issue Sep 18, 2021 · 19 comments · Fixed by #339
Closed

New strategy based in indicators #327

thesam1545 opened this issue Sep 18, 2021 · 19 comments · Fixed by #339
Labels
enhancement New feature or request

Comments

@thesam1545
Copy link

thesam1545 commented Sep 18, 2021

I have watched a video about an expert trading guy, who talked about the best indicators that should be used to buy/sell in the crypto world:
https://www.youtube.com/watch?v=33lGueGyrc4&t=3s&ab_channel=TheSecretMindset

He claims that there are 4 indicators that work in different areas and are very powerful when working together: VWAP, Heikin-Ashi candles, MACD and Bollinger Bands

This bot is very well made, but I have not made meaningful profits with the Trailing Stop Orders...
I have very little coding knowledge, but I would like to see these indicators applied in this bot. Anyone here would like to give them a try and try to implement them in this bot?

@thesam1545 thesam1545 added the enhancement New feature or request label Sep 18, 2021
@chrisleekr
Copy link
Owner

Originally, the bot was developed to use MACD and Bollinger Bands.
However, those indicators were causing very wrong signals with the live market data.
What I mean is, if you just look at the charts for the past data, it does make sense with MACD/Bollinger Bands.
With feeding the live data, it didn't really work.

Trailing stop orders is just a method to follow the lowest/highest price, not the indicator.
The buy indicator in this bot is simply, the lowest value within configured time.
The sell indicator in this bot is simply, a certain amount of the profit percentage.

Now, adding indicators is not an issue. But how to configure/calculate and use the signal are the issue.
Although, I am a bit sceptical because all indicators with the past data always making sense.
Unless you can predict the future, the indicators will be always behind.

I had many suggestions that traders want to have more indicators. However, I am not a professional in trading or math at all.
If you can give me a more specific formula and configurable variables, then I can help to implement them.

@thesam1545
Copy link
Author

thesam1545 commented Sep 19, 2021

First of all, thank you for you reply and for this great tool you developed and keep updating.

Now, I understand what you said, but what understood from the video is that those 4 indicators should be used combined because they cover different signals... so maybe those indicators missing should be added.. I don't know let me know, your opinion. Also, I can provide and explain the formulas.

@thesam1545
Copy link
Author

thesam1545 commented Sep 23, 2021

Basically, lets take for example XVGEUR pair...

@chrisleekr in your opinion, if we take in consideration the technical analysis based in indicators, available in TradingView platform: https://br.tradingview.com/symbols/XRPEUR/technicals/ and use the sell and buy signal in the "Summary" gauge to make decisions on sell/buy and quantity, in the selected time frame, we would be losing money? Is TradingView providing "wrong information"?

I really don't know, but my curiosity is really high.

@eth-man
Copy link

eth-man commented Sep 24, 2021

I know a very good bot that uses TV signals (not sure if we would mention the company name)
you can get very high success rates with the combination RSI below 70 and TV, buy, strong buy signals.
I think these are good indicators because of the crowd use itself can raise the price of the coin
it is not always accurate , you'll still have red bags

@chrisleekr
Copy link
Owner

@chrisleekr in your opinion, if we take in consideration the technical analysis based in indicators, available in TradingView platform: https://br.tradingview.com/symbols/XRPEUR/technicals/ and use the sell and buy signal in the "Summary" gauge to make decisions on sell/buy and quantity, in the selected time frame, we would be losing money? Is TradingView providing "wrong information"?

I never said the technical analysis will lose money. It is more of an issue to code/configure the indicators, which takes a lot of my time and energy to develop the features. If there are easy methods to get those indicators like this TradingView technical page, definitely I can add in.

That trading view technicals page is pretty interesting.

The best way is if there is a free API service to provide those indicators with actions, we can hook with buy/sell configurations.
The alternative way will be parsing their website (or HTTP call), but this may be illegal so definitely not suggested.
The last option is calculating all indicators in the bot itself, which I want to avoid because it will be complex to add all signals to the bot.

@thesam1545
Copy link
Author

thesam1545 commented Sep 24, 2021

@chrisleekr @eth-man
TradingView only has a payed feature that gives an alert when an indicator crosses a certain value... https://www.youtube.com/watch?v=-wT9h9Nc9sk&ab_channel=PartTimeLarry
But if we follow this logic, we would have the indicator we want,but still had to decide what indicators to use, when to buy and how much based on the indicators value.
I think this way is a no go, because it requires more work and effort when we already have all the work made for us in the technical analysis webpage. However, TradingView does not have any direct feature or API that shares the when to buy/sell "gauge".

In my opinion, parsing their website (or HTTP call), if it is a relative easy job to do, would be the way. And we could evaluate the bot success from it.

@chrisleekr
Copy link
Owner

I actually found this - https://www.tradingview.com/widget/technical-analysis/

For the first cut, I may be able to add this to the frontend for reference purposes.
This is simply using their provided free service.

image

In my opinion, parsing their website (or HTTP call), if it is a relative easy job to do, would be the way. And we could evaluate the bot success from it.

It's not like just getting the HTML as this must be rendered via their Javascript.
It should load the browser to get the content.

@thesam1545
Copy link
Author

thesam1545 commented Sep 25, 2021

Nice thing you made, congratulations. @chrisleekr :)
But we still have to decide how many times the bot will sell or buy during a timelapse. And how much crypto it will sell or buy based in the gauge position.

My suggestion is that it sells or buy the available asset in a percentage of the gauge position.
Strong sell - 100% asset sell
Strong buy - 100% asset buy
Neutral - do nothing

I think the bot can make it once within the selected timelapse.
1 minute timelapse - 1 trade per minute
15 min timelapse - 1 trade per 15 minutes

We should add the restriction to not sell lower than the bought price, just in case anything goes wrong, and also see if transaction worths it in terms of fees.

Also, @chrisleekr is there any way we can talk by message? I am not familiar with github but I can not find message Button.

Thanks!

@thesam1545
Copy link
Author

Any news guys? @chrisleekr @eth-man

@chrisleekr
Copy link
Owner

chrisleekr commented Sep 29, 2021

I have found an amazing project in Github - https://github.com/brian-the-dev/python-tradingview-ta

I am currently testing this. The first bit will be displaying this information in the frontend instead of the humongous widget.

image

And need to think about how we gonna use this valuable information to control buy.

At this point, I cannot think of more strategy than this.

  • Prevent buy when summary->recommendation is Sell/Strong Sell

Any idea is welcome.

@thesam1545

My suggestion is that it sells or buy the available asset in a percentage of the gauge position.
Strong sell - 100% asset sell
Strong buy - 100% asset buy
Neutral - do nothing

I am not sure this is a good strategy.
You buy/sell based on the gauge position, then there is no reason to use this bot because that is a completely different method.

FYI, below is an example response from TradingView Indicators.

{
  "request": {
    "symbol": "BNBBUSD",
    "screener": "CRYPTO",
    "exchange": "BINANCE",
    "interval": "15m"
  },
  "result": {
    "summary": {
      "RECOMMENDATION": "BUY",
      "BUY": 15,
      "SELL": 3,
      "NEUTRAL": 8
    },
    "time": "2021-09-29T09:43:57.767347",
    "oscillators": {
      "RECOMMENDATION": "SELL",
      "BUY": 2,
      "SELL": 2,
      "NEUTRAL": 7,
      "COMPUTE": {
        "RSI": "NEUTRAL",
        "STOCH.K": "SELL",
        "CCI": "NEUTRAL",
        "ADX": "NEUTRAL",
        "AO": "BUY",
        "Mom": "SELL",
        "MACD": "BUY",
        "Stoch.RSI": "NEUTRAL",
        "W%R": "NEUTRAL",
        "BBP": "NEUTRAL",
        "UO": "NEUTRAL"
      }
    },
    "moving_averages": {
      "RECOMMENDATION": "STRONG_BUY",
      "BUY": 13,
      "SELL": 1,
      "NEUTRAL": 1,
      "COMPUTE": {
        "EMA10": "BUY",
        "SMA10": "BUY",
        "EMA20": "BUY",
        "SMA20": "BUY",
        "EMA30": "BUY",
        "SMA30": "BUY",
        "EMA50": "BUY",
        "SMA50": "BUY",
        "EMA100": "BUY",
        "SMA100": "BUY",
        "EMA200": "BUY",
        "SMA200": "BUY",
        "Ichimoku": "NEUTRAL",
        "VWMA": "BUY",
        "HullMA": "SELL"
      }
    },
    "indicators": {
      "Recommend.Other": -0.09090909,
      "Recommend.All": 0.35454545,
      "Recommend.MA": 0.8,
      "RSI": 59.45566222,
      "RSI[1]": 66.17994334,
      "Stoch.K": 80.91724103,
      "Stoch.D": 88.1631423,
      "Stoch.K[1]": 92.11853974,
      "Stoch.D[1]": 91.45227263,
      "CCI20": 56.84754522,
      "CCI20[1]": 100.62893082,
      "ADX": 29.6937108,
      "ADX+DI": 26.67708743,
      "ADX-DI": 14.20205611,
      "ADX+DI[1]": 29.04556221,
      "ADX-DI[1]": 11.91163443,
      "AO": 4.58294118,
      "AO[1]": 4.53117647,
      "Mom": 1.4,
      "Mom[1]": 2.6,
      "MACD.macd": 1.72132292,
      "MACD.signal": 1.68961239,
      "Rec.Stoch.RSI": 0,
      "Stoch.RSI.K": 36.97331276,
      "Rec.WR": 0,
      "W.R": -37.5,
      "Rec.BBPower": 0,
      "BBPower": 2.11688552,
      "Rec.UO": 0,
      "UO": 51.90442043,
      "close": 343.5,
      "EMA5": 343.85490119,
      "SMA5": 344.08,
      "EMA10": 343.33535351,
      "SMA10": 343.46,
      "EMA20": 342.02880971,
      "SMA20": 341.85,
      "EMA30": 340.97079884,
      "SMA30": 340.35,
      "EMA50": 339.71367498,
      "SMA50": 338.62,
      "EMA100": 339.08805053,
      "SMA100": 337.641,
      "EMA200": 340.64173101,
      "SMA200": 340.703,
      "Rec.Ichimoku": 0,
      "Ichimoku.BLine": 339.9,
      "Rec.VWMA": 1,
      "VWMA": 342.48713398,
      "Rec.HullMA9": -1,
      "HullMA9": 344.58148148,
      "Pivot.M.Classic.S3": 306.33333333,
      "Pivot.M.Classic.S2": 321.13333333,
      "Pivot.M.Classic.S1": 327.06666667,
      "Pivot.M.Classic.Middle": 335.93333333,
      "Pivot.M.Classic.R1": 341.86666667,
      "Pivot.M.Classic.R2": 350.73333333,
      "Pivot.M.Classic.R3": 365.53333333,
      "Pivot.M.Fibonacci.S3": 321.13333333,
      "Pivot.M.Fibonacci.S2": 326.78693333,
      "Pivot.M.Fibonacci.S1": 330.27973333,
      "Pivot.M.Fibonacci.Middle": 335.93333333,
      "Pivot.M.Fibonacci.R1": 341.58693333,
      "Pivot.M.Fibonacci.R2": 345.07973333,
      "Pivot.M.Fibonacci.R3": 350.73333333,
      "Pivot.M.Camarilla.S3": 328.93,
      "Pivot.M.Camarilla.S2": 330.28666667,
      "Pivot.M.Camarilla.S1": 331.64333333,
      "Pivot.M.Camarilla.Middle": 335.93333333,
      "Pivot.M.Camarilla.R1": 334.35666667,
      "Pivot.M.Camarilla.R2": 335.71333333,
      "Pivot.M.Camarilla.R3": 337.07,
      "Pivot.M.Woodie.S3": 310.8,
      "Pivot.M.Woodie.S2": 320.4,
      "Pivot.M.Woodie.S1": 325.6,
      "Pivot.M.Woodie.Middle": 335.2,
      "Pivot.M.Woodie.R1": 340.4,
      "Pivot.M.Woodie.R2": 350,
      "Pivot.M.Woodie.R3": 355.2,
      "Pivot.M.Demark.S1": 324.1,
      "Pivot.M.Demark.Middle": 334.45,
      "Pivot.M.Demark.R1": 338.9,
      "open": 344.8,
      "P.SAR": 345
    }
  }
}

@thesam1545
Copy link
Author

I am not sure this is a good strategy. You buy/sell based on the gauge position, then there is no reason to use this bot because that is a completely different method.

I just though that was a simple way to approach our problem. If we use the widget + look for the lowest curent price in comparison with previous prices (current bot method), the bot will take a long time to buy. And will take a long time to sell too.

@chrisleekr
Copy link
Owner

chrisleekr commented Sep 30, 2021

I just though that was a simple way to approach our problem. If we use the widget + look for the lowest curent price in comparison with previous prices (current bot method), the bot will take a long time to buy. And will take a long time to sell too.

Yeah, it may take some time, but it will give some safeguard to buy at a high price.
I am thinking to do it in this way in addition to the one method above-mentioned.

  • Prevent buy when summary->recommendation is Sell/Strong Sell
  • Reschedule auto-trigger buy when the recommendation is Neutral/Sell/Strong Sell

I had some progress with tradingview indicators as below.

image

Now it's time to hook the above-mentioned features with tradingview.

@thesam1545
Copy link
Author

Looks a good logic to test and see @chrisleekr .

Is it possible for me to test this too?

@chrisleekr
Copy link
Owner

It's still under development. Still need to write test cases as well. It will take some time.

@thesam1545
Copy link
Author

It's still under development. Still need to write test cases as well. It will take some time.

Ok, any doubt or advice or help (if I have the know how) I can give tell me. :)

@eth-man
Copy link

eth-man commented Oct 2, 2021

@chrisleekr , that's looks wonderful
It looks like you using 15 minutes interval
Will it be possible to allow the user change it ?
Or choose multiple intervals for the same coin ?

Thank you

@chrisleekr
Copy link
Owner

@eth-man Of course. It will use candle intervals. I am preparing the PR now.

@eth-man
Copy link

eth-man commented Oct 2, 2021

Thanks🙏

@chrisleekr chrisleekr linked a pull request Oct 2, 2021 that will close this issue
@thesam1545
Copy link
Author

@eth-man Of course. It will use candle intervals. I am preparing the PR now.

Congratulations and thanks!

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

Successfully merging a pull request may close this issue.

3 participants