找回密码
 注册
搜索
查看: 1532|回复: 9

请教下有谁知道哪儿有技术指标的opensource源代码?

[复制链接]
发表于 2017-5-22 11:15 AM | 显示全部楼层 |阅读模式


比如MACD STO什么的?
发表于 2017-5-22 11:40 AM | 显示全部楼层
应用于那个平台的?券商Script,还是自己C++/java?
回复 鲜花 鸡蛋

使用道具 举报

发表于 2017-5-22 01:46 PM | 显示全部楼层
On TOS they have call Thinker Script. Do not know whether this will be useful to you.

This is MACD

#
# TD Ameritrade IP Company, Inc. (c) 2007-2017
#

declare lower;

input fastLength = 12;
input slowLength = 26;
input MACDLength = 9;
input averageType = AverageType.EXPONENTIAL;
input showBreakoutSignals = no;

plot Value = MovingAverage(averageType, close, fastLength) - MovingAverage(averageType, close, slowLength);
plot Avg = MovingAverage(averageType, Value, MACDLength);

plot Diff = Value - Avg;
plot ZeroLine = 0;

plot UpSignal = if Diff crosses above ZeroLine then ZeroLine else Double.NaN;
plot DownSignal = if Diff crosses below ZeroLine then ZeroLine else Double.NaN;

UpSignal.SetHiding(!showBreakoutSignals);
DownSignal.SetHiding(!showBreakoutSignals);

Value.SetDefaultColor(GetColor(1));
Avg.SetDefaultColor(GetColor(8));
Diff.SetDefaultColor(GetColor(5));
Diff.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Diff.SetLineWeight(3);
Diff.DefineColor("Positive and Up", Color.GREEN);
Diff.DefineColor("Positive and Down", Color.DARK_GREEN);
Diff.DefineColor("Negative and Down", Color.RED);
Diff.DefineColor("Negative and Up", Color.DARK_RED);
Diff.AssignValueColor(if Diff >= 0 then if Diff > Diff[1] then Diff.color("Positive and Up") else Diff.color("Positive and Down") else if Diff < Diff[1] then Diff.color("Negative and Down") else Diff.color("Negative and Up"));
ZeroLine.SetDefaultColor(GetColor(0));
UpSignal.SetDefaultColor(Color.UPTICK);
UpSignal.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
DownSignal.SetDefaultColor(Color.DOWNTICK);
DownSignal.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);

点评

多谢!  发表于 2017-5-23 09:26 AM
回复 鲜花 鸡蛋

使用道具 举报

发表于 2017-5-22 03:49 PM | 显示全部楼层
你去下载免费的ninjatrader,然后就可以得到它所有指标的源代码,是C#的。

4.png

点评

多谢!  发表于 2017-5-23 09:28 AM
回复 鲜花 鸡蛋

使用道具 举报

发表于 2017-5-22 11:12 PM | 显示全部楼层
IB trading workstatetion 有许多技术指标的代码, 但是你可以选择它,用它,
它没有代码的技术解释。

点评

谢啦  发表于 2017-5-23 09:29 AM
回复 鲜花 鸡蛋

使用道具 举报

发表于 2017-5-23 12:18 PM | 显示全部楼层
oldpigwang 发表于 2017-5-22 11:12 PM
IB trading workstatetion 有许多技术指标的代码, 但是你可以选择它,用它,
它没有代码的技术解释。

Please let us know your find out,
Thanks.
回复 鲜花 鸡蛋

使用道具 举报

发表于 2017-5-23 12:21 PM | 显示全部楼层
oldpigwang 发表于 2017-5-23 12:18 PM
Please let us know your find out,
Thanks.

也许把IB的代码进入 Google Search搜查 能给予解释, 说明。
希望你在这里分享,共同学习。
回复 鲜花 鸡蛋

使用道具 举报

发表于 2017-5-23 12:47 PM | 显示全部楼层
oldpigwang 发表于 2017-5-23 12:21 PM
也许把IB的代码进入 Google Search搜查 能给予解释, 说明。
希望你在这里分享,共同学习。

老猪姐你也要常来哦。
回复 鲜花 鸡蛋

使用道具 举报

发表于 2017-5-23 05:07 PM | 显示全部楼层
风行过 发表于 2017-5-23 12:47 PM
老猪姐你也要常来哦。

我习惯于用几个常用的Chart indicator 来决定自己trading 的进出场。
IB的studies 很多, 有momentum Studies, trend studies, pivot study.
要下功夫才能明白 每一个技术指标的意义和不同。
以后请北京哥哥常来这里说说体会, 跟他一起学习学习,
感到很需要。
风行过弟弟,你带个头吧。其实胡同高手很多。
回复 鲜花 鸡蛋

使用道具 举报

发表于 2017-5-23 06:25 PM | 显示全部楼层
oldpigwang 发表于 2017-5-23 05:07 PM
我习惯于用几个常用的Chart indicator 来决定自己trading 的进出场。
IB的studies 很多, 有momentum St ...

大家都多多参与讨论吧。不然就一个人溜达也没意思。
回复 鲜花 鸡蛋

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|www.hutong9.net

GMT-5, 2024-4-20 06:45 AM , Processed in 0.076244 second(s), 23 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表