INNER CODE UNIT · Python
Backtester
Erfaniaa/crypto-trading-strategy-backtester · backtester.py:18
class Backtester():
POSITIONS_CSV_REPORT_COLUMN_NAMES = "Position type,Entry time,Exit time,Leverage,USDTs in position (no leverage),Entry price,Exit price,Profit % (no leverage),Take-profit price,Stop-loss price,Exit type"
DEPOSIT_CHANGES_CSV_REPORT_COLUMN_NAMES = "Start deposit,Final deposit,Total profit %,Min monthly deposit change %,Avg monthly deposit change %,Max monthly deposit change %,Min trimonthly deposit change %,Avg trimonthly deposit change %,Max trimonthly deposit change %,Min yearly deposit change %,Avg yearly deposit change %,Max yearly deposit change %"
NO_POSITION = 0
OPEN_LONG_POSITION = 1
CLOSE_LONG_POSITION = 2
OPEN_SHORT_POSITION = 4
CLOSE_SHORT_POSITION = 8
def __init__(self, coins_symbol, start_deposit, leverage,
open_position_fee_percent, close_position_fee_percent,
use_long_positions, use_short_positions,
take_profit_percents_list, stop_loss_percents_list,
start_year, start_month, start_day, start_hour, start_minute, start_second,
end_year, end_month, end_day, end_hour, end_minute, end_second,
report_percentiles_count,