﻿<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.hs633.com:8080/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-cn">
		<id>http://wiki.hs633.com:8080/index.php?action=history&amp;feed=atom&amp;title=%E5%A4%9A%E6%9D%A1%E4%BB%B6%E6%A8%A1%E5%9E%8B%E7%A4%BA%E4%BE%8B</id>
		<title>多条件模型示例 - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.hs633.com:8080/index.php?action=history&amp;feed=atom&amp;title=%E5%A4%9A%E6%9D%A1%E4%BB%B6%E6%A8%A1%E5%9E%8B%E7%A4%BA%E4%BE%8B"/>
		<link rel="alternate" type="text/html" href="http://wiki.hs633.com:8080/index.php?title=%E5%A4%9A%E6%9D%A1%E4%BB%B6%E6%A8%A1%E5%9E%8B%E7%A4%BA%E4%BE%8B&amp;action=history"/>
		<updated>2026-04-04T08:13:52Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.19.1</generator>

	<entry>
		<id>http://wiki.hs633.com:8080/index.php?title=%E5%A4%9A%E6%9D%A1%E4%BB%B6%E6%A8%A1%E5%9E%8B%E7%A4%BA%E4%BE%8B&amp;diff=2229&amp;oldid=prev</id>
		<title>2013年6月20日 (四) 02:23 Ly</title>
		<link rel="alternate" type="text/html" href="http://wiki.hs633.com:8080/index.php?title=%E5%A4%9A%E6%9D%A1%E4%BB%B6%E6%A8%A1%E5%9E%8B%E7%A4%BA%E4%BE%8B&amp;diff=2229&amp;oldid=prev"/>
				<updated>2013-06-20T02:23:41Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←上一版本&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;2013年6月20日 (四) 02:23的版本&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第18行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第18行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; //KD出现死叉并且前一个周期J值大于70&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; //KD出现死叉并且前一个周期J值大于70&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; bExitShort :=CROSS(D,K) and J[1]&amp;gt;70;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; bExitShort :=CROSS(D,K) and J[1]&amp;gt;70;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; if bEnterLong then &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Buy&lt;/del&gt;;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; if bEnterLong then &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;buy&lt;/ins&gt;;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;//满足开多条件，开多仓&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; if bExitLong then sell;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; if bExitLong then sell;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;//满足平多条件，平多仓&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; if bEnterShort then SellShort;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; if bEnterShort then SellShort;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;//满足开空条件，开空仓&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; if bExitShort then BuyToCover;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; if bExitShort then BuyToCover;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;//满足平空条件，平空仓&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ly</name></author>	</entry>

	<entry>
		<id>http://wiki.hs633.com:8080/index.php?title=%E5%A4%9A%E6%9D%A1%E4%BB%B6%E6%A8%A1%E5%9E%8B%E7%A4%BA%E4%BE%8B&amp;diff=2224&amp;oldid=prev</id>
		<title>Ly: 以“    //-------智能交易公式--------------     //该模型仅仅用来示范如何根据指标编写简单的模型     //用户需要根据自己交易经验，...”为内容创建页面</title>
		<link rel="alternate" type="text/html" href="http://wiki.hs633.com:8080/index.php?title=%E5%A4%9A%E6%9D%A1%E4%BB%B6%E6%A8%A1%E5%9E%8B%E7%A4%BA%E4%BE%8B&amp;diff=2224&amp;oldid=prev"/>
				<updated>2013-06-20T02:08:15Z</updated>
		
		<summary type="html">&lt;p&gt;以“    //-------智能交易公式--------------     //该模型仅仅用来示范如何根据指标编写简单的模型     //用户需要根据自己交易经验，...”为内容创建页面&lt;/p&gt;
&lt;p&gt;&lt;b&gt;最新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;    //-------智能交易公式--------------&lt;br /&gt;
    //该模型仅仅用来示范如何根据指标编写简单的模型&lt;br /&gt;
    //用户需要根据自己交易经验，进行修改后再实际应用!!!&amp;lt;br&amp;gt;&lt;br /&gt;
    RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;&lt;br /&gt;
    K:=SMA(RSV,3,1);&lt;br /&gt;
    D:=SMA(K,3,1);&lt;br /&gt;
    J:=3*K-2*D;&lt;br /&gt;
    //以上为KDJ公式&amp;lt;br&amp;gt;&lt;br /&gt;
    MA5:MA(C,5);&lt;br /&gt;
    MA10:MA(C,10);&lt;br /&gt;
    //以上为定义5个周期收盘价的简单移动平均和10个周期收盘价的简单移动平均&amp;lt;br&amp;gt;&lt;br /&gt;
    //5周期均线上穿10周期均线并且前一个周期的J值（KDJ）少于70或者KD金叉时并且J值小于30&lt;br /&gt;
    bEnterLong :=(CROSS(MA5,MA10) and J[1]&amp;lt;70) or(CROSS(K,D) and J&amp;lt;30); {多头买入} &lt;br /&gt;
    //KD出现金叉并且前一个周期J值小于30&lt;br /&gt;
    bExitLong :=CROSS(K,D) and J[1]&amp;lt;30; {多头卖出}&amp;lt;br&amp;gt;&lt;br /&gt;
    //5周期均线下叉10周期均线并且前一个周期的J值（KDJ）大于30或者KD死叉时并且J值大于70	&lt;br /&gt;
    bEnterShort :=(CROSS(MA10,MA5) and J[1]&amp;gt;30) or(CROSS(D,K) and J&amp;gt;70);&lt;br /&gt;
    //KD出现死叉并且前一个周期J值大于70&lt;br /&gt;
    bExitShort :=CROSS(D,K) and J[1]&amp;gt;70;&amp;lt;br&amp;gt;&lt;br /&gt;
    if bEnterLong then Buy;&lt;br /&gt;
    if bExitLong then sell;&lt;br /&gt;
    if bEnterShort then SellShort;&lt;br /&gt;
    if bExitShort then BuyToCover;&lt;/div&gt;</summary>
		<author><name>Ly</name></author>	</entry>

	</feed>