The YABAR2 strategy is a trading strategy that involves using technical indicators to make buy and sell decisions. Here is a brief explanation of how the strategy works:
Timeframe: The strategy operates on 15-minute candlestick data. Indicators:
RSI (Relative Strength Index): The strategy calculates the RSI indicator with a time period of 14.
Bollinger Bands: The strategy calculates the Bollinger Bands indicator with a window of 20 and 2 standard deviations.
Buy Condition:
The strategy triggers a buy signal when the following conditions are met:
RSI is below 35.
The closing price is below the lower Bollinger Band. Sell Condition:
The strategy triggers a sell signal when the following conditions are met:
There are no specific sell conditions defined in the code. (The sell conditions are commented out.)
Stop Loss:
The strategy uses a custom stop loss function (custom_stoploss) to dynamically set the stop loss level based on the current profit of a trade. The custom stop loss function defines different stop loss levels based on the current profit percentage. The stop loss levels decrease as the profit percentage increases. Take Profit:
The strategy defines a minimal return on investment (ROI) of 0.1 (10%). There are no specific take profit conditions defined in the code. Order Types:
The strategy uses limit orders for both buying and selling. In case of an emergency sell, force buy, force sell, or stop loss, market orders are used. Stop loss orders can be executed on the exchange directly (if supported), and the strategy checks for stop loss every 60 minutes. The stop loss limit ratio is set to 0.99. Please note that some parts of the code are commented out or not utilized (e.g., trailing stop settings).