Type/to search

【定投】【新手入门】每周100USDT左右-定期不定额 (100USDT Invested Every Week - Regular Variable Investment)

Python
0
Follow
0
Followers

每周定投100USDT左右,定期不定额,跌了多买,涨了少买,收益率优于定额

Source
Python
def main():
    amountAll = 0                                              #持有总量
    cost = 0                                                   #成本
    marketValueCurrent = 0                                     #当前持有总市值
    marketValueExpected = 0                                    #当前期望总市值
    rateOfReturn = 0                                           #收益率
    eachBuy = 100
    while True:
        marketValueExpected = marketValueExpected + eachBuy        #计算当前期望总市值
        ticker = exchange.GetTicker()
        price = ticker['Last']                                 #获得当前价格
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)