The "JustROCR" strategy is a backtesting strategy for trading. Here's a brief description of what it does:
The strategy is implemented as a class that inherits from the "IStrategy" interface. It defines the following parameters:
"minimal_roi" is a dictionary specifying the minimum return on investment (ROI) desired.
In this case, it aims for a 20% ROI.
"stoploss" is a parameter that sets the maximum loss tolerance.
Here, it is set at -20%. "trailing_stop" is a boolean parameter that enables trailing stop functionality, which adjusts the stop loss level as the price moves favorably. "ticker_interval" is a parameter that sets the interval of the ticker data. Here, it is set to '1h' for 1-hour intervals. The strategy also implements three methods:
"populate_indicators" is a method that calculates the Rate of Change Ratio (ROCR) indicator using the "ta.ROCR" function from the "talib" library. It adds a new column called "rocr" to the input dataframe, calculated with a period of 499. "populate_buy_trend" is a method that determines when to enter a buy trade. It sets the value of the "buy" column to 1 for rows where the "rocr" value is greater than 1.10. "populate_sell_trend" is a method that determines when to exit a buy trade. It doesn't have any conditions specified, so it doesn't populate the "sell" column. This strategy uses the ROCR indicator to identify potential buying opportunities when the value exceeds a threshold. However, it doesn't specify any conditions for selling, so additional logic would need to be implemented to determine when to sell the assets.