Trading-Bot-M20 / fix_swing.py
raghava4u's picture
Upload folder using huggingface_hub
d53dc44 verified
Raw History Blame Contribute Delete
356 Bytes
import sys, re
with open('strategy/swing.py', 'r', encoding='utf-8') as f:
text = f.read()
text = text.replace('elif daily_trend < 0:', 'elif daily_trend < 0:\n return self._neutral(symbol, now, current_price, "negative_trend_ignored")\n elif False:')
with open('strategy/swing.py', 'w', encoding='utf-8') as f:
f.write(text)