输入/搜索内容

超级趋势策略

趋势
复制: 349
点击次数: 14490
1
关注
280
关注者

应平台用户要求, 平台正在兼容TradingView的Pine语言函数库,现已完成工作

语法完全兼容到v5版本
ta库指标完全实现
math库完全实现
input输入参数自动识别到界面
request.security对heikinashi的支持
strategy库实现简单入场退场(暂不支持条件单)
plot/plotchar/alert/alertcondition 兼容
strategy函数pyramiding参数控制仓位的实现
对语言的函数完全支持是一个持续努力的过程, 此公开版本为方便用户测试提前公开

后期优宽会进行持续不段的增加完善对TradingView的Pine语言的函数库支持, 有需求可以本策略留言

注: 如果遇到变量未定义证明尚不支持此属性可删除相关调用(比如颜色画线相关)后续后逐渐完善支持

img

策略源码
Pine
/*backtest
start: 2021-04-27 00:00:00
end: 2022-04-26 23:59:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_CTP","currency":"FUTURES"}]
*/
strategy("SuperTrend", overlay=true)

[supertrend, direction] = ta.supertrend(input(3, "factor"), input.int(2, "atrPeriod"))

plot(direction < 0 ? supertrend : na, "Up direction", color = color.green, style=plot.style_linebr)
策略参数
策略参数
factor
atrPeriod
评论
全部评论 (0)
暂无数据
暂无数据
  • 1
iPhone 下载
社区
回测系统
© 2015 - ∞ YouQuant 豫ICP备19046564号