openfund-taker 1.3.6__py3-none-any.whl → 1.3.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: openfund-taker
3
- Version: 1.3.6
3
+ Version: 1.3.8
4
4
  Summary: Openfund-taker
5
5
  Requires-Python: >=3.9,<4.0
6
6
  Classifier: Programming Language :: Python :: 3
@@ -1,7 +1,7 @@
1
1
  taker/MultiAssetOldTradingBot.py,sha256=uBh_BxglvcbaHIsWHM7GI9Qa_QjzsxXaXJAAWEOMO5c,15315
2
2
  taker/ThreeLineTradingTaker.py,sha256=ElD9pKDO4nxw5VKNRrvXqyiU0gkV_1Mg_zk-hftfaPs,20553
3
3
  taker/TrailingSLAndTPTaker.py,sha256=rx3tw9TwFCpqnz3e0WlTtFVcn8mBbPHtp62n3RF86Kg,1144
4
- taker/TrailingSLTaker.py,sha256=cU_rI_uI0XFmuDNMW_i5DmI-5EA5NCe-mLVNhthxa1E,42792
4
+ taker/TrailingSLTaker.py,sha256=vAIOvB32LulkXDBIhergpyK9wdSkxL1hjPnbG0KPPCE,42792
5
5
  taker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  taker/chua_bitget.py,sha256=YY6XK5Bd-wlArsN5BnAfiqE0h1DPkti6i4TEB4F5zDA,12918
7
7
  taker/chua_bn.py,sha256=GnTePWlgDwdHgroBbEp1Ajcsf5_m_Vn_RV63SYzu2jI,10668
@@ -10,7 +10,7 @@ taker/chua_ok_all.py,sha256=2XnZM6QdB3juSE1pqQIJyh2x1XuhlTlnBKNA3owlJ9E,15267
10
10
  taker/chua_ok_bot.py,sha256=9SW0ujhi6PfN4yR1JZ9NaA37HtnXJ2QAWUfW52NG68w,13109
11
11
  taker/config.py,sha256=YPxghO5i0vgRg9Cja8kGj9O7pgSbbtzOgf3RexqXXwY,1188
12
12
  taker/main.py,sha256=QCEjINu3IgwWEGcuquHzeYjKJYAQrPe8ctQhMoIb9SA,2561
13
- openfund_taker-1.3.6.dist-info/METADATA,sha256=pBXaqV1kuyWEln1QYZY-H86Z790pmXHVegRHvhlbhW4,7527
14
- openfund_taker-1.3.6.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
15
- openfund_taker-1.3.6.dist-info/entry_points.txt,sha256=a7mG8F7aOA5-Gk2vPWuAR4537faxaHUgM_jwIDBZoEc,50
16
- openfund_taker-1.3.6.dist-info/RECORD,,
13
+ openfund_taker-1.3.8.dist-info/METADATA,sha256=fjvZGpn0hvZ4L8pp6bwVcl3Pm2Z5a46kSQrtV3__c5o,7527
14
+ openfund_taker-1.3.8.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
15
+ openfund_taker-1.3.8.dist-info/entry_points.txt,sha256=a7mG8F7aOA5-Gk2vPWuAR4537faxaHUgM_jwIDBZoEc,50
16
+ openfund_taker-1.3.8.dist-info/RECORD,,
taker/TrailingSLTaker.py CHANGED
@@ -418,15 +418,15 @@ class TrailingSLTaker:
418
418
  self.logger.warning(f"{symbol}: No position found for {symbol}")
419
419
  return False
420
420
 
421
- if_stop_loss_success = False
422
- if_take_profit_success = False
421
+ if_stop_loss_success = True
422
+ if_take_profit_success = True
423
423
 
424
424
  if stop_loss_price :
425
425
  if_stop_loss_success = self.set_stop_loss(symbol=symbol, position=position, stop_loss_price=stop_loss_price)
426
426
  if take_profit_price :
427
427
  if_take_profit_success = self.set_take_profit(symbol=symbol, position=position, take_profit_price=take_profit_price)
428
428
 
429
- return if_stop_loss_success or if_take_profit_success
429
+ return if_stop_loss_success and if_take_profit_success
430
430
 
431
431
  def set_take_profit(self, symbol, position, take_profit_price=None) -> bool:
432
432
 
@@ -806,7 +806,7 @@ class TrailingSLTaker:
806
806
  """
807
807
 
808
808
  total_profit = self.calculate_average_profit(symbol, position)
809
- if total_profit > 0.0 :
809
+ if total_profit != 0.0 :
810
810
  self.logger.info(f"{symbol} 当前总盈利: {total_profit:.2f}%")
811
811
  self.send_feishu_notification(f"{symbol} 当前总盈利: {total_profit:.2f}%")
812
812