BITTREX:ETHUSDT   Ethereum / Tether
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.

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

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

macdfastLength = input(4, minval=1)
macdslowLength=input(22,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)
strategy.close_all(when=sellBB)

/////
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")
Komen: 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..
Balas
MS Bahasa Melayu
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
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
Laman Utama Pengimbas Saham Pengesan Isyarat Forex Pencari isyarat mata wang Crypto Kalendar Ekonomi Bagaimana ia berfungsi Ciri-ciri Carta Peraturan Rumah Moderator Laman web dan Penyelesaian Broker Widget Perpustakaan Carta Stok Permintaan Ciri Blog & Berita Soalan Lazim Bantuan & Wiki Twitter
Profil Pengesetan Profil Akaun dan Bil Tiket Sokongan Saya Hubungi Sokongan Idea-idea yang diterbitkan Pengikut Mengikuti Mesej Peribadi Perbualan Log Keluar