Download fix_swing.py from raghava4u/Trading-Bot-M20: direct link, hf CLI and curl.
- Browser
- Download file 356 Bytes
-
https://huggingface.co/raghava4u/Trading-Bot-M20/resolve/main/fix_swing.py
- Command line
-
hf download hf://raghava4u/Trading-Bot-M20/fix_swing.py
-
curl -L -o fix_swing.py https://huggingface.co/raghava4u/Trading-Bot-M20/resolve/main/fix_swing.py
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) | |