April 25, 2024

TSLab's blog Complement the screener: calculating the size of lots based on the rate of price change

Good day!

In the previous article we put together a simple initial screener.
Changed it a littleAt all. That is, the initial logic is preserved, changed "manimanagement"
The essence is actually simple, although it looks complicated. The faster the price passes a given threshold, the greater the number of lots we will open and, accordingly, vice versa.
TSLab's blog Complement the screener: calculating the size of lots based on the rate of price change

In other words, if we spend an hour crawling towardsa given boundary, then this is a sluggish movement. This means that the risk that the price will stop is growing every second. And if we are moving rapidly, then the price can, by inertia, work out our levels, and, accordingly, the risk is less.
We implemented it like this.The robots are given a deposit of $1000, this will be the maximum possible position size, and if the price flies the distance we need in 1 minute, then we will open exactly at $1000, and with each new bar, the lot size will decrease and by the end of the hour it will be only ~ $16.
For clarity, here is another example of how the speed of movement affects the lot size.
TSLab's blog Complement the screener: calculating the size of lots based on the rate of price change

We will continue to improve (as it seems to us) the algorithm, so if anyone is interested, write your thoughts as well.
Today we were scolded a little in our telegramchannel, that you need to do a slightly more structured block diagram so that later, after downloading the script, everyone can understand the logic. In principle, we will try, but we cannot promise this. But if someone likes to arrange everything pedantically, send us your options, we will post them!)
They also asked to show examples not only oncrypto, but also MICEX. Here I can only say that anyone can adapt any script for themselves to any market. On cryptocurrencies, trading history is simply available. and TSLab is free for the user, so we consider it more optimal and convenient in terms of demonstration.