随笔- 45
文章- 0
评论- 2
阅读-
22574
06 2023 档案
二十三、区块量化 TD指标
摘要:#!/usr/bin/env python# -*- coding: utf-8 -*-import talibimport cross_order as orderimport timedef TDSequential(close): tdlist = [0, 0, 0, 0] # tdlist是
阅读全文
二十二、区块量化 其它常用分析指标
摘要:talib 不是万能的、有些其它指标 如:BBI、PSY、BIAS等这些指标是没有的 def BBI(df, n1=3, n2=6, n3=12, n4=24): """ 多空指数 """ bbi = (MA(df["close"], n1) + MA(df["close"], n2) + MA(d
阅读全文
二十一、区块量化 TA-Lib 的形态指标
摘要:#!/usr/bin/env python# -*- coding: utf-8 -*-import cross_order as orderimport talibsymbol = 'BTC-USDT-SWAP' # okx# symbol = 'BTCUSDT' # binance# symbo
阅读全文
二十、区块量化 TA-Lib 的一些常用指标
摘要:#!/usr/bin/env python# -*- coding: utf-8 -*-import cross_order as orderimport talibsymbol = 'BTC-USDT-SWAP' # okx# symbol = 'BTCUSDT' # binance# symbo
阅读全文
十九、区块量化 形态策略
摘要:1、形态指常用的K线形态 如:早晨之星、黄昏十字星、乌云盖顶、三只乌鸦、白三兵、刺透形态等常用的几个主要形态 下面看代码: 新增 cross_modal_order.py #!/usr/bin/env python# -*- coding: utf-8 -*-import talibimport c
阅读全文
十八、区块量化 CCI策略
摘要:#!/usr/bin/env python# -*- coding: utf-8 -*-import talibimport cross_order as orderimport timeCCI_TIMEPERIOD = 84 # CCI计算周期CCI_OVER_SOLD_THRESH = -250
阅读全文
十七、区块量化 鳄鱼线策略
摘要:#!/usr/bin/env python# -*- coding: utf-8 -*-import talibimport cross_order as orderimport timeimport numpy as np"""鳄鱼线原理: 鳄鱼线是根据几何学以及非线性动力学总结出来的一套技术分析
阅读全文
十六、区块量化 MACD策略
摘要:新增cross_macd_order.py # -*- coding: utf-8 -*-import talibimport cross_order as orderimport timedef main(): print("任务开始时间:", time.strftime('%Y-%m-%d %H
阅读全文
十五、区块量化 双均线策略
摘要:新增cross_dualma_order.py # -*- coding: utf-8 -*-import cross_order as orderimport timeSHORT_WIN = 50 # 短周期窗口LONG_WIN = 200 # 长周期窗口def main(): print("任务
阅读全文
十四、区块量化 dual thrust策略
摘要:新增cross_dual_thrust_order.py文件 # -*- coding: utf-8 -*-import cross_order as orderimport timeSHORT_WIN = 10 # 短周期窗口SHORT_K1 = 0.5SHORT_K2 = 0.5def dual
阅读全文
十三、区块量化 gate.io 合约操作文件续
摘要:def create_order(symbol='EOS_USDT', quantity='1', message=''): """ 全仓合约市价下单 @param symbol:交易对 @param quantity:委托数量 正数为买入,负数为卖出 @param message: 判断依据 @r
阅读全文
十二、区块量化 gate.io 合约操作文件
摘要:新增cross_order.py 文件 # -*- coding: utf-8 -*-import pandas as pdfrom gate_api import ApiClient, Configuration, FuturesApi, FuturesOrderfrom gate_api.exc
阅读全文
十一、区块量化 gate.io 接口
摘要:1、接口文档网址:https://www.gate.ac/docs/developers/apiv4/zh_CN/#futures 2、安装python工具:pip3 install gateapi-python 3、下载https://github.com/gateio/gateapi-pytho
阅读全文
十、区块量化 通用文件 微信接口
摘要:1、首先申请开通微信企业号 2、新建一个应用 3、把应用id、企业Id、Secret 替换以下weixin.py文件 # -*- coding: utf-8 -*-import requestsimport jsonimport timeimport sysAppId = "1000002" # 应
阅读全文
九、区块量化 binance 合约操作文件续
摘要:def create_order(symbol='EOSUSDT', side='BUY', positionside='LONG', ordtype='LIMIT', price=Decimal('0'), quantity='1', message=''): """ 全仓合约市价下单 @para
阅读全文
八、区块量化 binance 合约操作文件
摘要:新增cross_order.py文件 # -*- coding: utf-8 -*-import pandas as pdfrom binance import Client, Configimport timeimport weixinfrom binance.enums import *from
阅读全文
七、区块量化 binance 接口
摘要:1、接口文档网址:https://binance-docs.github.io/apidocs/spot/cn/ 2、安装python工具:pip3 install python-binance 3、下载https://github.com/sammchardy/python-binance 4、解
阅读全文
六、区块量化 RSI策略
摘要:1、新增cross_rsi_order.py # -*- coding: utf-8 -*-import talibimport cross_order as orderimport timeRSI_PERIODS = 14 # RSI计算周期RSI_OVER_SOLD_THRESH = 30 #
阅读全文
五、区块量化 boll轨道策略
摘要:1、新增cross_boll_order.py # -*- coding: utf-8 -*-import talibimport cross_order as orderimport timeBOLL_N = 20 # BBands参数NBOLL_M = 2 # BBands参数Mdef main
阅读全文
二、区块量化 okx 配置修改
摘要:1、用pycharm软件打开python-okx-master文件 2、修改Account.py、MarketData.py、Trade.py文件 把debug = True 修改为debug=False 3、新增config.py文件 class Config: OKEX_API_KEY = '你
阅读全文
一、区块量化 okx接口
摘要:1、搭建liunx环境 可以是centos7 2、安装python3或anaconda3 3、安装接口 pip3 install python-okx 4、下载接口文件 https://github.com/okxapi/python-okx 5、解压python-okx-master 除了okx文
阅读全文
三、区块量化 okx 合约操作文件
摘要:1、打开新增的cross_order.py 文件 # -*- coding: utf-8 -*- import pandas as pd import okx.Account as account import okx.Trade as trade import okx.MarketData as
阅读全文
四、区块量化 okx 合约操作文件续
摘要:def create_order(symbol='EOS-USDT-SWAP', side='buy', positionside='long', ordtype='limit', price='0', quantity='1', tpTriggerPx='', tpOrdPx='', slTrig
阅读全文