论坛全局菜单下方 - exness285X70 - 韬客社区论坛全局菜单下方 - 荔枝返现285X70 - 韬客社区论坛全局菜单下方 - ThinkMarkets285X70 - 韬客社区论坛全局菜单下方 - TICKMILL 285X70 - 韬客社区
查看:962回复:1
三无男人韬客社区韬客社区
注册时间2015-05-18
[MT4指标]求大侠帮写指标
韬客社区
楼主发表于:2015-09-09 10:50只看该作者倒序浏览
1楼 电梯直达
电梯直达
1//@version=1 2// this code uses the Linear Regression Bull and Bear Power indicator created by RicardoSantos 3// and adds a signal line 4// Use : if signal line is changes color, you have your signal, green = buy, red = sell 5// Advice : best used with a zero lag indicator like ZeroLagEMA_LB from LazyBear 6// if price is above ZLEMA and signal = green => buy, price below ZLEMA and signal = red => sell 7study(title='[RS][NM]Improved Linear Regression Bull and Bear Power v01', shorttitle='BBP_NM', overlay=false) 8window = input(title='Lookback Window:', type=integer, defval=10) 9 10f_exp_lr(_height, _length)=> 11 _ret = _height + (_height/_length) 12 13h_value = highest(close, window) 14l_value = lowest(close, window) 15 16h_bar = n-highestbars(close, window) 17l_bar = n-lowestbars(close, window) 18 19bear = 0-f_exp_lr(h_value-close, n-h_bar) 20bull = 0+f_exp_lr(close-l_value, n-l_bar) 21direction = bull*2 + bear*2 22 2plot(title='Bear', series=bear, style=columns, color=maroon, transp=90) 24plot(title='Bull', series=bull, style=columns, color=green, transp=90) 25plot(title='Direction', series=direction, style=line, linewidth=3, color= direction > 0 ? green : red) http://att.520fx.com/data/attachment/forum/201509/09/184902dli3kt38fnk6k2id.png
TK29帖子1楼右侧xm竖版广告90-240
个性签名

韬客社区www.talkfx.co

广告
TK30+TK31帖子一樓廣告
TK30+TK31帖子一樓廣告
三无男人韬客社区韬客社区
注册时间2015-05-18
版权所有:韬客外汇论坛 www.talkfx.com 联络我们:[email protected]