Refactor code for improved readability and consistency
- Cleaned up whitespace and formatting in various files including http.py, language.py, logger.py, safe_exec.py, and SQL migration scripts. - Consolidated import statements and removed unnecessary blank lines. - Updated logging configuration for better clarity. - Enhanced the safe execution code with improved error handling and logging. - Removed commented-out code and unnecessary variables in backfill_zero_trades.py and other scripts. - Added a pyproject.toml for Ruff and Vulture configuration. - Introduced requirements-dev.txt for development dependencies. - Removed commented-out stock entries in init.sql for cleaner migration scripts.
This commit is contained in:
@@ -98,13 +98,13 @@ For charting, you often want to place the signal icon slightly above or below th
|
||||
```python
|
||||
# Place Buy marker 0.5% below the Low
|
||||
buy_marks = [
|
||||
df['low'].iloc[i] * 0.995 if df['buy'].iloc[i] else None
|
||||
df['low'].iloc[i] * 0.995 if df['buy'].iloc[i] else None
|
||||
for i in range(len(df))
|
||||
]
|
||||
|
||||
# Place Sell marker 0.5% above the High
|
||||
sell_marks = [
|
||||
df['high'].iloc[i] * 1.005 if df['sell'].iloc[i] else None
|
||||
df['high'].iloc[i] * 1.005 if df['sell'].iloc[i] else None
|
||||
for i in range(len(df))
|
||||
]
|
||||
```
|
||||
@@ -166,12 +166,12 @@ df['sell'] = sell
|
||||
# -----------------------
|
||||
# Calculate marker positions
|
||||
buy_marks = [
|
||||
df['low'].iloc[i] * 0.995 if buy.iloc[i] else None
|
||||
df['low'].iloc[i] * 0.995 if buy.iloc[i] else None
|
||||
for i in range(len(df))
|
||||
]
|
||||
|
||||
sell_marks = [
|
||||
df['high'].iloc[i] * 1.005 if sell.iloc[i] else None
|
||||
df['high'].iloc[i] * 1.005 if sell.iloc[i] else None
|
||||
for i in range(len(df))
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user