BITTREX:ETHUSDT   Ethereum / Tether
627 1
I finished this MACD & BB strategy. Back testing shows promising results in just 7 months worth of trades. Below is the script feel free to play around with it, and if you can make any improvements please share..

Oh, on the alerts.. I realize that the script has to be in study mode.. I may use this in study mode once I'm done to trigger alerts to be sent to Gunbot.. Any ideas on that are welcomed too.

strategy("MACD & BB Strategy Script - ETH/USDT 4 HR", overlay=true)

MacdSrc = input(close, title="Source")

macdfastLength = input(4, minval=1)
macdsignalLength = input(9,minval=1)

fastMA = ema (MacdSrc, macdfastLength)
slowMA = ema (MacdSrc, macdslowLength)
macd = fastMA - slowMA
macdsignal = sma ( macd , macdsignalLength)
macdhist = macd - macdsignal

BBsrc = input(high, title = "source")

len = input(19, title = "timeframe / # of period's")
bbbase = ema (BBsrc, len )
evar = (BBsrc - bbbase)*(BBsrc - bbbase)
evar2 = (sum( evar , len ))/len
std = sqrt(evar2)
Multiplier = input(2, minval = 0.01, title = "# of STDEV's")
bbupper = bbbase + (Multiplier * std)
bblower = bbbase - (Multiplier * std)

buyMACD = cross( macd , macdsignal) and macd > macdsignal
sellMACD = cross( macd , macdsignal) and macd < macdsignal
buyBB = crossunder(BBsrc, bblower)
sellBB = crossover(BBsrc, bbupper)

if (crossover(macdhist, 0))
strategy.entry("MacdLE", strategy.long, comment="MACD Entry", when=buyMACD)

if (crossunder(macdhist, 0))
strategy.close_all(when = sellMACD)

longCondition = crossunder(BBsrc, bblower)
if (longCondition)
strategy.entry("BB Entry", strategy.long, comment="BB Entry", when=buyBB)

shortCondition = crossover(BBsrc, bbupper)
if (shortCondition)

alertcondition(buyMACD, title='MACD Buy')
alertcondition(sellMACD, title='MACD Sell', message='MACD Sell Signal!')
alertcondition(buyBB, title='BB Buy', message='BB Buy Signal!')
alertcondition(sellBB, title='BB Sell', message='BB Sell Signal!')

plot(bbbase, color = purple, linewidth = 1, title = "BB Basis")
plot(bbupper, color = blue, linewidth = 1, title = "BB Upper band")
plot(bblower, color = blue, linewidth = 1, title = "BB Down band")
评论: All trading involves high risk; past performance is not necessarily indicative of future results. Hypothetical or simulated performance results have certain inherent limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not actually been executed, the results may have under- or over-compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profits or losses similar to those shown.
I used the script on ZCash since it has been trading sideways.. Over a year if you would have bought and held Zcash you would have made 45.21%.. Back testing my script to trigger buy/sell positions with ZCash it would have hypothetically made 656.71% over 12 months..
ZH 简体中文
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
SV Svenska
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 繁體中文
AR العربية
HE עברית
首页 股票筛选器 外汇筛选器 加密货币筛选器 财经日历 如何运作 图表功能 网站规则 版主 网站 & 经纪商解决方案 插件 图表库 功能请求 博客 & 新闻 常见问题 帮助 & 维基 Twitter
概述 个人资料设置 账号和账单 我的客服工单 联系支持 已发表观点 粉丝 正在关注 私人消息 聊天 退出