March 25, 2023

Death from slipping.

If you work with crypto, create algorithms, build a fund, come to my little telegram, where I write what I'm doing on the way to create an algorithmic foundation -, 2 heads are better than 1
Being engaged in the development of reversealgorithm (when stopping, position reversal) for BTCUSD, I realized that getting into a panic sat / buy is now 100% probability, because exit from the transaction can only be by stop loss and we are always in position.

Therefore, I did not average for each transactionslippage by the asset, and specifically to each, by the logic that slippage = (high / stoploss-1) * 0.7 (That is, we close “Tipo” on the market in the second half of the candle).

I did this at 4h candles and ofigel that the peak values ​​reached 20% of the span.

But then 4h, I decided to conduct a study more carefully, studying 1 minute.

For 3 years he made a minute tablet and substituted for each minute to count as the price gulnula to high or low from the opening point.

Peak values ​​reach 18%! The problem is not in 4 hours, everything happens in 1 minute.
Clap and margin count.
Or an order closed in the market at n times higher risk.
Or an unfulfilled limiter and paper loss even more.

Then I saw that after the peak, the second minute, toowith a high value, but the opposite, then someone simply throws off the glass on the market, buys it in the moment, and he does not have time to fill up with new orders.

Made a column next to open previousminutes. And after all, I deduced the formula in such a way that it would be necessary to calculate what slippage should be put in the limiter, so that when the glass was sucked in, the price would return to it and close at the most pleasant limiter price.

Personal findings:
1) 12 of the 14 leaps were in 2017, more than half at the beginning of the year on low liquidity, now things are better, but there is a place to be.

2) Sitting with ~ 3 + leverage on the entire deposit is a matter of time margin.

3) The maximum slippage to which the glass6.4% returned, i.e. laying in the limiter the price from the stop trigger is 7%, with a probability of 99% closing will be at the best price at critical moments, but worse at snot times up to 7% with a pullback.

4) In just 3 years there were 5 moments where there was the highest slippage with return, the rest do not exceed 2%.

5) If you take into account the risk of 2% (adjustable volumepositions depending on the stop) on the deal, then in 3 years there was 5 times falling into a panic and the loss would reach up to 3.75%, i.e. almost double excess.

6) In this case, the reverse would increase the loss by going to the end of the tail.

1) It is necessary to open the coup (reverse) not immediately, but after at least a few minutes, mb to close the n-minute (hourly) candle.

2) Lay slippage in the calculation of risk in6.4% instead of 2% is not an option, because there will be a significant decrease in volume, and hence profit. Calculations show that it is better to be prepared for a 2-fold loss.

3) In calculating the position volume, lay 2.1% slippage on this asset, also set 2.1% of the trigger in the limiter.

4) If the SL is not executed, then after 3-5 minutes to close with handles on the market, the glass should be filled in time, it will be better than immediately on the market. Ideally, in a robot you need to gash such a control element.

5) Diversification on exchanges to avoid a shortage of liquidity in a glass.
5.1) Trading the schedule is not a specific exchange, but the average price of all, on which 70% of the asset. Avoid the stock tails solo.
5.2) With SL / TP / OPEN (trigger and orders on my side on the average price index), execute on the exchange where the price to the index and liquidity are better. Will there be a certain arbitration?

P.S. Please express your opinion, ideas and the main criticism of where I am messing with, objectivity from all sides is important for me to fix errors in my head.
Now we need to calculate:
1) What is the safest shoulder you can take that does not fall on the margin call.
2) How would slippage change taking into account the volume of my position and what is the maximum depth for not significantly affecting the market.
3) What are the indicators of altcoins and especially other markets, such as savings or oil futures.
Death from slipping.