Skip to content

Commit

Permalink
Merge pull request #250 from fasiondog/release
Browse files Browse the repository at this point in the history
Release 2.0.5
  • Loading branch information
fasiondog authored May 8, 2024
2 parents 350304b + b689e41 commit b053a9a
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 6 deletions.
15 changes: 14 additions & 1 deletion docs/source/release.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
版本发布说明
=======================

2.0.4 - 2024年4月25日
2.0.5 - 2024年5月8日
-------------------------

主要修复
1. fixed 接收spot时,分钟级别的成交量为股数
2. fixed SG_Cycle 其 alternate 属性须为 false,影响 PF 示例

其他修复
1. fixed strategy 加载权息失败
2. StrategyContext 在设定 ktypes 时进行从小到大的排序,以便后续能够按顺序调用 onBar
3. fixed setKRecordList 使用 move(ks) 时错误


2.0.4 - 2024年5月6日
-------------------------

1. 缺陷修复
Expand Down
32 changes: 31 additions & 1 deletion docs/source/trade_sys/signal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@
:param Indicator ind:
:param int slow_n: 慢线EMA周期
:return: 信号指示器



布尔信号指示器
^^^^^^^^^^^^^^^^

Expand All @@ -100,6 +101,35 @@
:return: 信号指示器


区间突破信号指示器
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. py:function:: SG_Band(ind, lower, upper)
指标区间指示器, 当指标超过上轨时,买入;
当指标低于下轨时,卖出。

::

SG_Band(MA(C, n=10), 100, 200)


持续买入信号指示器
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. py:function:: SG_AllwaysBuy()
一个特殊的SG,持续每天发出买入信号,通常配合 PF 使用


PF调仓周期买入信号指示器
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. py:function:: SG_Cycle()
一个特殊的SG,配合PF使用,以 PF 调仓周期为买入信号


自定义信号指示器
----------------

Expand Down
6 changes: 5 additions & 1 deletion hikyuu_cpp/hikyuu/trade_sys/signal/crt/SG_Cycle.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

namespace hku {

/**
* 以 PF 调仓周期为买入信号
* @return SignalPtr
*/
SignalPtr HKU_API SG_Cycle();

}
} // namespace hku
10 changes: 8 additions & 2 deletions hikyuu_pywrap/trade_sys/_Signal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,18 @@ void export_Signal(py::module& m) {

m.def("SG_Band", SG_Band, py::arg("ind"), py::arg("lower"), py::arg("upper"),
R"(SG_Band(ind, lower, upper)
指标区间指示器, 当指标超过上轨时,买入;
当指标低于下轨时,卖出。::
SG_Band(MA(C, n=10), 100, 200)
)");

m.def("SG_AllwaysBuy", SG_AllwaysBuy);
m.def("SG_Cycle", SG_Cycle);
m.def("SG_AllwaysBuy", SG_AllwaysBuy, R"(SG_AllwaysBuy()
一个特殊的SG,持续每天发出买入信号,通常配合 PF 使用)");

m.def("SG_Cycle", SG_Cycle, R"(SG_Cycle()
一个特殊的SG,配合PF使用,以 PF 调仓周期为买入信号)");
}
2 changes: 1 addition & 1 deletion xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ add_rules("mode.debug", "mode.release")
if not is_plat("windows") then add_rules("mode.coverage", "mode.asan", "mode.msan", "mode.tsan", "mode.lsan") end

-- version
set_version("2.0.4", {build = "%Y%m%d%H%M"})
set_version("2.0.5", {build = "%Y%m%d%H%M"})

local level = get_config("log_level")
if is_mode("debug") then
Expand Down

0 comments on commit b053a9a

Please sign in to comment.