binance-trading-bot icon indicating copy to clipboard operation
binance-trading-bot copied to clipboard

Add additional TradingView interval

Open chrisleekr opened this issue 3 years ago • 7 comments

Is your proposal related to a problem?

The TradingView gives the confidence to trade the coin when it's a Strong Buy or Buy. However, the limitation is the TradingView indicator is retrospective.

At the moment, I configured the TradingView interval as 30m. However, the trend can be changed very quickly before new technical analysis results come.

Describe the solution you'd like

The solution would be adding an additional interval to monitor.

i.e.

  1. 5m
    • [ ] Buy at Strong Buy
    • [ ] Buy at Buy
  2. 30m
    • [ ] Buy at Strong Buy
    • [ ] Buy at Buy

Scenario 1

  1. 5m
    • [x] Buy at Strong Buy
    • [ ] Buy at Buy
  2. 30m
    • [x] Buy at Strong Buy
    • [ ] Buy at Buy

If 5m/30m both are Strong Buy, then trigger the buy action.

Scenario 2

  1. 5m
    • [x] Buy at Strong Buy
    • [x] Buy at Buy
  2. 30m
    • [x] Buy at Strong Buy
    • [ ] Buy at Buy

If 5m is Strong Buy or Buy and 30m is Strong Buy, then trigger the buy action.

Scenario 3

  1. 5m
    • [x] Buy at Strong Buy
    • [x] Buy at Buy
  2. 30m
    • [x] Buy at Strong Buy
    • [x] Buy at Buy

If 5m/30m both are Strong Buy or Buy, then trigger the buy action.

Scenario 4

  1. 5m
    • [x] Buy at Strong Buy
    • [x] Buy at Buy
  2. 30m
    • [ ] Buy at Strong Buy
    • [ ] Buy at Buy

If 5m is Strong Buy or Buy, then trigger the buy action. As 30m conditions are not configured, it should be ignored.

Scenario 5

  1. 5m
    • [ ] Buy at Strong Buy
    • [ ] Buy at Buy
  2. 30m
    • [ ] Buy at Strong Buy
    • [ ] Buy at Buy

If no condition is checked, then ignore TradingView technical analysis.

Describe alternatives you've considered

No alternative.

Additional context

It may cause too much traffic to TradingView. Will it block the request? Not sure yet. I think it should be fine as it's using WebSocket if I understand correctly.

chrisleekr avatar Aug 19 '22 13:08 chrisleekr

@chrisleekr I found an interesting thing that recommendation is not changing in selected inverval only. It's guessing the value every second causing sometimes a lot of changes in recommendation. Also the 30m interval is sometimes too long to buy the dip. I'm considering to rewrite #473 in other way as what I found to be an issue is probably better solution than what I was trying to suggest.

uhliksk avatar Aug 20 '22 06:08 uhliksk

Hi @uhliksk

I am a bit confused, let me clarify. (Sorry, my English is not that good)

I found an interesting thing that recommendation is not changing in selected inverval only.

Are you saying, the recommendation is not updated as TradingView recommendation?

It's guessing the value every second causing sometimes a lot of changes in recommendation.

A bit confused. What do you mean?

Also the 30m interval is sometimes too long to buy the dip.

Yes, I agree. Hence, I am trying to add additional TradingView recommendation to avoid the delay.

I'm considering to rewrite https://github.com/chrisleekr/binance-trading-bot/issues/473 in other way as what I found to be an issue is probably better solution than what I was trying to suggest.

Oki. I think I will wait for your solution and then work on this issue. 👍

chrisleekr avatar Aug 20 '22 13:08 chrisleekr

Hi @chrisleekr

Are you saying, the recommendation is not updated as TradingView recommendation?

From what I've seen during the rush hours the recommendation is not chaning once per interval but it is calculating the recommendation continuously. For example, if the interval is 5 minutes it doesn't mean the recommendation is changing once per 5 minutes. It is changing continuously using the data from previous 5 minutes. For example at time 8:30:00 it will use data from 8:25:00 to 8:30:00 but at time 8:30:10 it will use data from 8:25:10 to 8:30:10, etc.

uhliksk avatar Aug 20 '22 15:08 uhliksk

@uhliksk

Ah, right. That was what you meant.

I imagine the delay is expected all indicators are retrospective. Unless we collect the data ourselves and calculate all the different indicators, which I tried and failed miserably. (I am not good at math)

One thing I notice from Tradingview_ta, which we are using, it calculates the recommendation itself. https://github.com/brian-the-dev/python-tradingview-ta/blob/main/tradingview_ta/technicals.py#L204

And it may also calculate different recommendations against what TradingView does.

Hence, I am thinking to add an additional interval to monitor. If it can monitor two indicators, at least, reduce some time gap.

chrisleekr avatar Aug 21 '22 11:08 chrisleekr

Slowly, but getting there.

image

image

chrisleekr avatar Oct 14 '22 14:10 chrisleekr

Hello @chrisleekr

Nice! Can't wait to try that and see how it can affect on the trades 💯

habibalkhabbaz avatar Oct 14 '22 15:10 habibalkhabbaz

This will become an awesome feature!!! 🚀🚀🚀

rando128 avatar Oct 14 '22 17:10 rando128