Comments (3)
Nice one, yeah I noticed the issue before but just ignored it because I wasn't sure if it was happening only on some candles.
Edge Case: What If a candle close happens as we download the data, probably best to just assume this is really unlikely.
When combining the historical data I do a comparison to see if the candle is later than the previous, maybe I should check that the candle interval length is uniform with the others instead.Then I could just remove the candle if it isn't uniform, this would solve both issues I guess.
from binance-futures-trading-bot.
After thinking further, I think your solution solves the problem entirely good work.
Either way if the candle closes or not mid download the websocket stream will have that candle so we are good to throw away the last one.
from binance-futures-trading-bot.
Exactly as you mentioned. Socket stream has current candle.. Thing is yeah scenario that in historical data you will pull closed candle is really unlikely (I even say impossible) because when candle close - new candle is formed immediately therefore socket stream has previous candle as closed .. Nearly impossible situation is that you will pull historical data in exact time of candle close on miliseconds precision. In that case it would happen that you will remove last whole candle therefore in data will be 1 candle skipped. but as was already concluded that is nearly impossible situation and I believe that new candle is formed by Binance at once with close of candle so there is no chance to get closed candle without new so you always get open candle.
from binance-futures-trading-bot.
Related Issues (20)
- Unable to use Heikin Ashi with new bot HOT 2
- Incorrect trailing stop calculation for long positions HOT 3
- Is this line correct? HOT 2
- Live_Bot.py - ImportError: cannot import name 'ThreadedWebsocketManager' from 'binance' HOT 4
- Error Process HOT 1
- ZeroDivisionError: division by zero HOT 2
- multiple strategy HOT 1
- the bot was not tracking trade can you tell me what is the problem HOT 1
- Following Binance APIs are deprecated. HOT 1
- Error occurred during live_trading HOT 7
- Quantity less than or equal to zero. HOT 3
- Connection aborted issue on azure app service HOT 8
- Issue HOT 1
- the bot does not start HOT 2
- issue HOT 2
- Bot cannot run ubuntu os. Pls help!!! HOT 3
- There is no place to call the check_close_pos function in the latest version.
- Mexc
- Heikin_Ashi Strategy, TSL HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from binance-futures-trading-bot.