当前位置:→ 股海网通达信公式 → 正文
  • 通达信【股票之友S理论】——对比逻辑

  • 相关简介:我本善良,沉默非弱! 最近,论坛有些友友对我很不满,严重质疑我的技术水平,我在本贴再次申明,我发贴是我兴趣,同时帮助喜欢我风格的友友们,早些建立自己的交易策略模型. 我绝对不会卖指标,也没有这必要! 有本事就明目张胆地挑战我,不要鬼鬼祟祟的! 以下是一个国外知名市场时机逻辑指标,有本事就编写出来,没本事就不要再打扰我,谢谢! 国外知名市场时机逻辑指标原本: In Timing The Market With Pairs Logic in this issue, author Perry Kauf

  • 文章来源:股海网作者:股海网发布时间:2014-03-04浏览次数:下载次数:0

我本善良,沉默非弱!
     最近,论坛有些友友对我很不满,严重质疑我的技术水平,我在本贴再次申明,我发贴是我兴趣,同时帮助喜欢我风格的友友们,早些建立自己的交易策略模型.
     我绝对不会卖指标,也没有这必要! 有本事就明目张胆地挑战我,不要鬼鬼祟祟的!
  
    以下是一个国外知名市场时机逻辑指标,有本事就编写出来,没本事就不要再打扰我,谢谢!
 
国外知名市场时机逻辑指标原本:
 In “Timing The Market With Pairs Logic” in this issue, author Perry Kaufman explains how to backtest the idea of hedging with an index-based ETF. Based on his article, we have created two new strategies and a new study for thinkorswim users in our proprietary scripting language, thinkScript. One strategy is for the equity and the other strategy is for the ETF.
 For the Equity Strategy click here or:
 
From our TOS Charts, Select Studies → Edit Studies.
 Select the Strategy tab in the upper left hand corner.
 Select New in the lower left hand corner.
 Name the strategy (i.e. Stress)
 Click in the script editor window, remove “addOrder(OrderType.BUY_AUTO, no);” and paste the following:
 script StressIndicator {
     input stock = "<currently selected symbol>";
     input index = "SPY";
     input length = 50;
 
    def rangeStock = Highest(high(stock), length) - Lowest(low(stock), length);
     plot StochStock = 100 * if rangeStock != 0 then (close(stock) - Lowest(low(stock), length)) / rangeStock else 0;
 
    def rangeIndex = Highest(high(index), length) - Lowest(low(index), length);
     plot StochIndex = 100 * if rangeIndex != 0 then (close(index) - Lowest(low(index), length)) / rangeIndex else 0;
 
    def diff = StochStock - StochIndex;
     def rangeDiff = Highest(diff, length) - Lowest(diff, length);
     plot Stress = 100 * if rangeDiff != 0 then (diff - Lowest(diff, length)) / rangeDiff else 0;
 }
 
input index = "SPY";
 input length = 50;
 input investment = 5000;
 input entryLevel = 10;
 input exitLevel = 50;
 input stopLoss = 10.0;
 input minPrice = 3.0;
 input minPriceLength = 5;
 
def minPirceOk = Lowest(close, minPriceLength) > minPrice;
 def stress = reference StressIndicator(index = index, length = length).Stress;
 def entryPrice = EntryPrice();
 def crisisStop = close / entryPrice - 1 < -stopLoss / 100;
 def isReady = if !isReady[1] and stress > 50 then yes else if IsNaN(crisisStop) then isReady[1] else if !IsNaN(entryPrice) and crisisStop then no else isReady[1];
 
AddOrder(OrderType.BUY_TO_OPEN, isReady and stress <= entryLevel and minPirceOk, tradeSize = investment / close, tickColor = GetColor(1), arrowColor = GetColor(1), name = "StressLE");
 
AddOrder(OrderType.SELL_TO_CLOSE, !minPirceOk, tickColor = GetColor(2), arrowColor = GetColor(2), name = "StressMinPriceLX");
 AddOrder(OrderType.SELL_TO_CLOSE, stress >= exitLevel, tickColor = GetColor(2), arrowColor = GetColor(2),  name = "StressLX");
 AddOrder(OrderType.SELL_TO_CLOSE, crisisStop, tickColor = GetColor(2), arrowColor = GetColor(2), name = "StressCrisisStopLX");
 
thinkorswim
 A division of TD Ameritrade, Inc.

通达信【股票之友S理论】——对比逻辑

 ☟问题反馈 ☞┄┄┄┄┄┄┄┄┄┄→收藏资源:

通达信【股票之友S理论】——对比逻辑

  • 下载资源所需积分

    0

  • 当前拥有积分

    0

上传会员: 
股海网
文件大小: 
Bytes
上传时间: 
2014-03-04
下载积分: 
-
免责声明: 
请仔细阅读并同意后才能下载
本附件为用户分享上传,股海网没有对文件进行验证,不能保证下载资源的准确性、安全性和完整性,也不保证下载资源能正常安装和使用,且下载后扣除的积分无法退还,除非您充分理解并完全接受本声明,否则您无权下载。
本站对提供下载的软件、指标、资料等不拥有任何权利,其版权归该下载资源的合法拥有者所有。本附件仅供学习和研究使用,不得用于商业或者非法用途,如有侵犯您的版权, 请参看 《股海网侵权处理流程》《股海网免责声明条款》
点击下载无反应时,更换主流浏览器重新登录操作,如360浏览器、Edge浏览器、谷歌浏览器,个别浏览器有不兼容现象。
勾选以下表示您已经阅读并同意以上声明才能下载本文件,扣除积分无法退还!
我已阅读所有条款规定, 请点我同意 所有条款内容!我自愿下载!
提示:如下载失败,请点关闭刷新此页面或提交问题反馈给管理员→
关闭

关于我们 - 联系我们 - 隐私政策 - 免责声明 - 下载帮助 - 广告合作 - SiteMap - TOP
增值电信业务经营ICP许可证:湘B2-20210269 湘ICP备09016573号-10 湘公网安备43108102000040号
Copyright © 2021 铭网科技,All Rights Reserved.