Разработать trading bot на binance

Цена договорная
29 декабря 2022, 18:14 • 16 откликов • 102 просмотра
Идея бота
искать флет между двумя уровнями фибоначи, если такой находится тогда открывать сделки в две стороны
на binance futures
PYTHON

детали
1. Сколько уровней фибоначи нужно? 13 уровней: -0.500, -0.382, -0.236, 0, 0.236, 0.382, 0.500, 0.618, 0.786, 1.000, 1.236, 1.382, 1.500
2. Для фибоначи нужны две точки, нижняя и верчняя (High, Low)
Если нисходящий тренд - верхняя точка fibo level 0
как ищем High, Low? в последних 5000 бар, ищём разницу между фибо 1 и 0.786 чтобы была > 0.5% (user configurable) но меньше 0.6% (user configurable)
3. Как ищем флет? Берем последние N (user configurable) свечей (не смотрим на тени свечей), 80% (user configurable) из этих свечей должны быть в рамке двух близких уровней фибо (к примеру между 0.500 и 0.618, назовём их high1 and low1)

4. Если нашли флет, тогда открываем STOP limit buy and sell.
a. BUY from fibo level high1+1.
take profit1 = one fibo above high1 (high1 + 2)
take profit2 = two levels above high1 (high1 + 3)
stop loss = high1
if price moved half way to the take profit1, move the stop loss level to (high1 + 1)
if we took take profit1, and if we moved half way to the take profit2, move the stop loss level to (high1 + 2)
b. SELL from low1-1
take profit1 = one fibo below low1 (low1 -2)
take profit2 = two levels below low1 (low1 - 3)
stop loss = low1
if we moved half way to the take profit1, move the stop loss level to (low1-1)
if we took take profit1, and if we moved half way to the take profit2, move the stop loss level to (low1-2)



Limit just one stop buy and stop sell orders per chart
if bot detected that the flat moved to between anothers 2 fibo levels, delete all pending orders.
if take profit1 and profit2 has been activated, delete oposite pending order.
if stop loss has been activated, delete oposite pending order, Configurable (T,F)
takeprofit1 and takeprofit2 = 50% of the position
shall work on any timeFrame
lot size configuration as input configuration
ability to test the strategy on testing strategy

Добавлю скриншот с примером если надо.
Файлы