Crypto trading bot - 1 signal strategy (preferred binance, but not a must)

Job ID: 30654950

Budget: $15 – $25 USD

Hi all,

thank you for reading.

A.
I want to ask you to create a bot that automatically trades based on hourly data (H1 strategy), not 1; 5 minutes.
B.
User-customizable parameters:
a) timeframe 1h,4h, daily
b) level of entry into trading based on % of the account, or fixed size (i.e. 1BTC)
c) stop loss level based on the signal
d) take profit level based on the percentage of price movement since the start of trading
e) currency pair security (one trade per currency pair only)

C.
The strategy is based on fractals (as an indicator).
No moving averages, no RSI, MACD etc.

D.
Rough description:
1. The fractal (buy / sell signal) appears.
2. Check if there is an open position on a given currency pair.
3. Once the trading is in line with the signal - do nothing
4. As there is trade in the opposite direction - close the trade, open a new one in the opposite direction.
5. As there is no trade - open a position consistent with the signal.

Open position:
a) as a percentage of the trading account
b) set the S / L stop loss - in points from the (minimum / maximum) value of the candle above which the fractal appeared
c) set T / P take profit - as a percentage of the opening price of the transaction
d) set Stop market order with S / L & T / P (fractal breakout) - in points from the minimum / maximum value of the candle above which the fractal appeared (will double the initial trade position)

Further scenarios:
I. During an open position, a new signal appears - do nothing if the signal matches the open position
II. the opposite signal appears - you close the current trade, open a new one






===
def wilFractal(dataframe):
df = dataframe.copy()
df['bear_fractal'] = (
dataframe['high'].shift(4).lt(dataframe['high'].shift(2)) &
dataframe['high'].shift(3).lt(dataframe['high'].shift(2)) &
dataframe['high'].shift(1).lt(dataframe['high'].shift(2)) &
dataframe['high'].lt(dataframe['high'].shift(2))
)

df['bull_fractal'] = (
dataframe['low'].shift(4).gt(dataframe['low'].shift(2)) &
dataframe['low'].shift(3).gt(dataframe['low'].shift(2)) &
dataframe['low'].shift(1).gt(dataframe['low'].shift(2)) &
dataframe['low'].gt(dataframe['high'].shift(2))
)

return df['bear_fractal'], df['bull_fractal']


- used to signal buy signal for a crypto trading bot in this manner:
def populate_buy_trend(self, dataframe, metadata)
dataframe.loc[
dataframe['bull_fractal'],
'buy'] = 1

return dataframe
Related categories: Python Software Testing Software Development