MACD低买高卖自动跟单滑动止损策略 , 基于Python实现。
交叉后前一柱指金叉后的第一柱的值, 交叉后前一柱指金叉前的最后一个柱的值, 滑动价格指下单时加的价格,比如买单会现价加上这个价格,卖单会减去这个价格
参数

代码
import math import time import datetime def Fixed(v): return
墨衍会员
·
AI 创作全网分发
墨衍智能分发
本文由作者通过墨衍一键同步至各平台
1分发平台
200+累计阅读
228平均单平台
已同步平台
优快云
微信公众号
微博
知乎
掘金
百家号
博客园
抖音
小红书
你的文章也可以这样分发
墨衍会员 ¥399起/年,写一次发全网
我也要 →
码龄7年
MACD低买高卖自动跟单滑动止损策略 , 基于Python实现。
交叉后前一柱指金叉后的第一柱的值, 交叉后前一柱指金叉前的最后一个柱的值, 滑动价格指下单时加的价格,比如买单会现价加上这个价格,卖单会减去这个价格
参数

代码
import math import time import datetime def Fixed(v): return
当前文章被以下社区和专栏收录:
BotVS趋势交易策略-RSI
BotVS趋势交易策略-RSI, 基于Python实现。 RSI简单买卖测试, 默认 70-100卖出,0-30买入 参数 代码 import math def adjustFloat(v): return math.floor(v*1000)/1000; # 取消挂起的订单 def cancelPendingOrders(): while True: ...
《活学活用wxPython》 pdf版,有图 全1-18章节
《活学活用wxPython》 pdf版,有图 全1-18章节 因为压缩包超过60M,所以分成两个压缩包上传,这个是第一部分,注意要两部分一起下载才能解压。
固定周期MACD
在某一周期上同时看其他周期的MACD,本指标可以在同一窗口看到不同周期的MACD,便于分析各周期之间的相互关系,
【汽车ECU标定技术解析】DCM文件与A2L、HEX的协同工作机制
本文深入解析了汽车ECU标定中DCM、A2L与HEX三大核心文件的协同工作机制。A2L文件作为定义标定变量地址与规则的“图纸”,DCM文件承载工程师调试后的具体标定数据,最终通过A2L的地址映射,将DCM数据固化生成可刷入ECU的HEX文件,形成完整的标定数据流转闭环。
camera——HAL层知识分享
CameraHAL层是Android相机系统的核心中间层,负责连接Framework层与硬件驱动层。它通过标准化接口解耦软硬件,实现跨平台兼容性,同时为厂商提供硬件定制空间。主要功能包括:设备管理、数据流处理、参数控制以及图像优化。关键子系统涵盖预览、拍照、录像、对焦与曝光等模块,采用HAL3的"请求-响应"模型实现精细控制。性能优化重点关注启动时间、帧率稳定性和延迟控制。通过分层架构设计(接口层-核心层-适配层)和缓冲池机制,确保高效数据传输和硬件资源调度。
Linux安装消息队列IBM MQ 7.5开发版安装配置详解
消息队列IBM MQ 7.5开发版安装配置详解 文章目录消息队列IBM MQ 7.5开发版安装配置详解前言一、什么是IBM MQ?二、安装前准备1、安装前准备2、安装MQ Server3、启动实例4、创建队列一个名为TEXT的队列(测试)5、启动端口监听6、启动成功总结 前言 IBM 已经熟练地优化了 MQ(消息队列),在市场上已有超过 25 年的历史。借助 MQ(消息队列),如果无法立即传递消息,那么会在其等待队列中确保消息安全,直到保证传递为止。竞争产品可能会传递两次消息或根本不传递消息,而 M
Obsidian笔记同步实战:基于Git的私有化部署与自动化管理
本文详细介绍了如何利用Git为Obsidian笔记构建私有化、自动化且免费的同步方案。通过安装配置Git与Obsidian-git插件,结合Gitee等远程仓库,实现笔记的版本管理、多设备同步与自动备份,打造安全可靠的知识管理体系。
CarPlay盒子选购避坑指南:为什么你的车机破解了却用不了?从USB设备ID说起
本文深入解析CarPlay盒子硬件兼容性问题,从USB设备ID匹配到车机适配逻辑,揭示破解成功却无法使用的根本原因。通过分析USB设备识别的核心要素和逆向工程usb_device_manager.xml文件,提供三种主流解决方案对比,并强调操作中的硬件保护机制,帮助车主避免常见陷阱。
SXU—软件测试方法和技术-朱少民-第四部分 软件测试流程和规范-附考点
软件测试方法和技术-朱少民-第四章 软件测试流程和规范—这本书最后一部分的考点整理,考点分析
通信算法之289:数据链/自组网通信设备--MIMO(2T2R)-SFBC-单载波频域均衡(SCFDE)系统系列--实际工程应用算法代码--2.SFBC-SCFDE原理讲解
OFDM传输系统,频谱利用率高,能够有效对抗多径衰落,并且可以通过设置不同的子载波数目来实现非对称数据传输,峰均比比高、易受频偏影响。SCFDE系统峰均比低、且对频偏不敏感。传输速率的增大会使得频率选择性衰落加剧,符号间干扰更加严重。
从 SAP GUI 走向 SAP Fiori:一套面向 SAP S/4HANA 的用户迁移实战方法论
SAP S/4HANA转型中,用户从SAP GUI迁移到Fiori的难点在于业务价值的重构而非简单的界面替换。Fiori的核心价值在于角色化、实时洞察和智能决策,而非完全替代GUI。成功迁移需分阶段推进:先展示关键角色的价值,建立统一入口,再逐步提高Fiori占比。让用户参与设计比后期培训更重要,需通过具体场景(如采购优先级管理)展示效率提升。迁移策略应平衡新旧界面优势,让Fiori成为业务价值触达的主要方式,而非强制替换。
深度学习工具包 DeepLearningToolbox
深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[](https://bitdeli.com/free "Bitdeli Badge")
WINCC7.3破解文件
WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!
最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版
Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。
数学建模模型总结
这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!
5166

被折叠的 条评论
为什么被折叠?



