Open salimj6 opened 3 years ago
Hi @salimj6 Thank you for the good suggestion.
I think what you are asking is very similar to https://github.com/chrisleekr/binance-trading-bot/issues/67
If it is the same strategy, to implement this, I have summarised how to implement it: https://github.com/chrisleekr/binance-trading-bot/issues/67#issuecomment-816375999
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.
@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:
Current price is 100$
average trading volume is sellVolume - buyVolume =+/- 500K over the last 5 minutes (price will be hovering between 98$ and 102$)
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
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.
@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.
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.
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.