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

Dip Detection Strategy #219

Open
salimj6 opened this issue Jun 5, 2021 · 3 comments
Open

Dip Detection Strategy #219

salimj6 opened this issue Jun 5, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@salimj6
Copy link

salimj6 commented Jun 5, 2021

Hello Chris,

I noticed something while trading. It is almost always a good buy when in a dip. We can detect this dip by adding the volume trading over a period of say 2 or 3 minutes and setting a value threshold that would trigger the buy.

For example, check the attached image. All crypto prices have the same trend. It is a way of detecting a dip.

image
image

We can add an option, buy dip and set a volume threshold over a few mins (can be variable as well). So the user can select whether to buy with the regular strategy or with the dip detection strategy. Selling is beautiful, i don't think we need to touch that yet.

I can try to help with this implementation, but i honestly have a lot on plate now. If you direct me to the areas in code where this can be added i will definitely fiddle with it on every free time i have.

@salimj6 salimj6 added the enhancement New feature or request label Jun 5, 2021
@chrisleekr
Copy link
Owner

chrisleekr commented Jun 5, 2021

Hi @salimj6
Thank you for the good suggestion.

I think what you are asking is very similar to #67

If it is the same strategy, to implement this, I have summarised how to implement it: #67 (comment)

To do this, you will need to touch the determine action step.

If it is the same strategy, let's close this issue and continue the discussion in #67.
If not, please let me know.

@salimj6
Copy link
Author

salimj6 commented Jun 5, 2021

@chrisleekr
I read the thread of #67 , the suggestion there relies mainly on the prices. What i am suggesting is relying on the volume trading of the market at a given time span. Now that I am thinking of it, we can confirm that this is a dip in price if the following condition applies, i will set an example:

  1. Current price is 100$

  2. average trading volume is sellVolume - buyVolume =+/- 500K over the last 5 minutes (price will be hovering between 98$ and 102$)

  3. suddenly we have over 2 minutes a (sellVolume - buyVolume = 5M) - which drives the price to 92$ or 80$ or 96$.... doesn't matter, we are monitoring volume

  4. Here we trigger the buy strategy that you have already mastered, which will keep on following the dip until our defined percentages are met.

So basically, this trigger will start buying regardless of the current/lowest/highest prices, it is simply making an educated buy based on volume of trading over the past couple of minutes.

@chrisleekr
Copy link
Owner

@salimj6

I think getting volume won't be an issue as it already does.

{
  eventType: 'kline',
  eventTime: 1508613366276,
  symbol: 'ETHBTC',
  open: '0.04898000',
  high: '0.04902700',
  low: '0.04898000',
  close: '0.04901900',
  volume: '37.89600000',
  trades: 30,
  interval: '5m',
  isFinal: false,
  quoteVolume: '1.85728874',
  buyVolume: '21.79900000',
  quoteBuyVolume: '1.06838790'
}

We will be able to store the candles for the last 5 mins and determine actions in the below code:

The question is how will we make variables and how to calculate the decision to buy.

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

No branches or pull requests

2 participants