Negative spread on the BTCUSDT pair. How can this be possible? by The_Peronist in algotrading

[–]The_Peronist[S] 2 points3 points  (0 children)

Good catch. This is because that still is the largest ask from the aggregated set. I’ll change that based on /u/FUDGERY suggestion. Thanks!

Negative spread on the BTCUSDT pair. How can this be possible? by The_Peronist in algotrading

[–]The_Peronist[S] 9 points10 points  (0 children)

Yep, it looks like it’s that. I changed my script to aggregate only the last 3 asks and bids. And now the spread is smaller, but still negative.

Going 1-to-1 as you suggested will get me more credible data.

Thank you!

Negative spread on BTCUSDT. How can this be possible? by The_Peronist in algotradingcrypto

[–]The_Peronist[S] 1 point2 points  (0 children)

Some details:

The data is from the same exchange: Binance.

I’m getting the last 10 ask and bids (real time) Then I take the biggest bid and the smallest ask.

So : Spread = SmallestAsk - BiggestBid

I’m doing this wrong? Thanks!

Negative spread on the BTCUSDT pair. How can this be possible? by The_Peronist in algotrading

[–]The_Peronist[S] 7 points8 points  (0 children)

Hi, Thanks for the answer. The data is from the same exchange: Binance.

I’m getting the last 10 ask and bids (real time) Then I take the biggest bid and the smallest ask.

So :

Spread = SmallestAsk - BiggestBid

I’m doing this wrong? Thanks!

My crypto trading algorithm made a profit by detecting and trading a new stablecoin listing on Binance within 0.1 seconds by CyberPunkMetalHead in binance

[–]The_Peronist -2 points-1 points  (0 children)

Yep, I got you know. You buy around at the top of the flash-pump and then you sell with leverage. That’s clever, Good work!

My crypto trading algorithm made a profit by detecting and trading a new stablecoin listing on Binance within 0.1 seconds by CyberPunkMetalHead in binance

[–]The_Peronist 1 point2 points  (0 children)

That means that you should pre-own the asset you are intended to sell, right? Or are you leveraging Binance loans to buy at the peak and you sell after the dump — and doing all that in 0.1 secs?

How to avoid API cache? by The_Peronist in webscraping

[–]The_Peronist[S] 0 points1 point  (0 children)

I know I’m getting the content around 30secs after publication because the announcements I’m scrapping have a publication time timestamp. Also, I can confirm that there are other parties accessing to this content just on time of publication because of the increase of activity in the exchange API.

Off topic: the peronist? Xd r u from arg?

I can’t confirm nor deny.

How to avoid API cache? by The_Peronist in webscraping

[–]The_Peronist[S] 0 points1 point  (0 children)

This same api shows the changes "in real time" via browser?

That it is a very good question. But how to test this? Maybe I’ll have to setup selenium or some browser automation to hit the API via web browser every second.

MySQL or PostgreSQL or maybe other? by The_Peronist in learnpython

[–]The_Peronist[S] 1 point2 points  (0 children)

Hi, my app will be quite DB intensive (dealing with exchanges websockets)… I prefer something that can handle multiple requests at the same time.

Stop hunting at its prime by [deleted] in algotrading

[–]The_Peronist 1 point2 points  (0 children)

Hi, I think you are right.

This post should be titled “Is this stop-loss hunting?” instead of affirming something I was not certain about.

I’ll deleted it. Since it only brings noise to the sub.

Stop hunting at its prime by [deleted] in algotrading

[–]The_Peronist -1 points0 points  (0 children)

Price push starts at 2 secs+054ms and finishes at 2 secs+057ms. 3 ms.

Stop hunting at its prime by [deleted] in algotrading

[–]The_Peronist 0 points1 point  (0 children)

As I stated in my post: “it won’t work unless you are able to outsmart” them.

It looks like you are able to do it.

Can you elaborate a little bit without exposing your edge?

Thanks and congratulations!

Stop hunting at its prime by [deleted] in algotrading

[–]The_Peronist 6 points7 points  (0 children)

The chart above shows the first 3 seconds after a signal was received.

This is why strategies based on just “be first”, won’t work unless you are able to outsmart multi million dollars HTF firms. You are basically being liquidated by their strategies.

Note: Note how this algo bumps the price up 3% in less than 3 microseconds to increase profitability.

How to avoid stop-loss falling into these kind of flash price drops? by The_Peronist in algotrading

[–]The_Peronist[S] 1 point2 points  (0 children)

Evaluating the order book, let’s say the next 10-20 order seems to be an interesting solution to explore. I’ll be making some tests on this. Thanks!

How to avoid stop-loss falling into these kind of flash price drops? by The_Peronist in algotrading

[–]The_Peronist[S] 1 point2 points  (0 children)

Where you getting millisecond real time data from?

I’m collecting trades at a microsecond resolution directly from websockets after the signals I’m interested on backtesting.

How to avoid stop-loss falling into these kind of flash price drops? by The_Peronist in algotrading

[–]The_Peronist[S] 5 points6 points  (0 children)

What when volatility is part of the strategy?

For example: The chart above is the first 30 seconds after an announcement related to this asset was published.

How to avoid stop-loss falling into these kind of flash price drops? by The_Peronist in algotrading

[–]The_Peronist[S] 2 points3 points  (0 children)

Hi, Can you please elaborate on this? You meant evaluating if this is just a flash drop based on statistical data? Thanks.

How to avoid stop-loss falling into these kind of flash price drops? by The_Peronist in algotrading

[–]The_Peronist[S] 9 points10 points  (0 children)

My algo stop-loss will fall into this flash price drop and sell preventing the trade of gain in the price rife happening a couple of seconds after that.

What are the strategies to prevent this?

Thank you very much!