neiluj

BB + RSI 20MIN, ETH/USDC

Optimisé pour ETH USDC en 20MIN sur poloniex seulement,

pour les autres pairs a vous de jouer ;)
Notes de version: BACKTEST DEPUIS 1 JANV 19
Supprimer des scripts favoris Ajouter aux scripts favoris

Commentaires

Pour le LTCUSD en 30min

//@version=2
strategy("LTCUSD BB + RSI 30MIN,", shorttitle="LTCUSD BBRSI 30MIN ", overlay=true, pyramiding=0, initial_capital=100, currency=currency.USD, commission_type=strategy.commission.percent,
commission_value=0.075, default_qty_value=50, default_qty_type=strategy.cash)

// Strategy Tester Start Time
sYear = input(2019, title = "Start Year")
sMonth = input(01, title = "Start Month", minval = 01, maxval = 12)
sDay = input(01, title = "Start Day", minval = 01, maxval = 31)
sHour = input(00, title = "Start Hour", minval = 00, maxval = 23)
sMinute = input(00, title = "Start Minute", minval = 00, maxval = 59)
startTime = time >= timestamp(sYear, sMonth, sDay, sHour, sMinute)


///////////// RSI
RSIlength = input(5,title="RSI Period Length")
RSIoverSold = input(20, minval=1,title="RSIL")
RSIoverBought = input(80, minval=1,title="RSIh")
price = open
vrsi = rsi(price, RSIlength)


///////////// Bollinger Bands
BBlength = input(60, minval=1,title="Bollinger Period Length")
BBmult = input(2.0, minval=0.001, maxval=50,title="Bb")
BBbasis = sma(price, BBlength)
BBdev = BBmult * stdev(price, BBlength)
BBupper = BBbasis + BBdev
BBlower = BBbasis - BBdev
source = close
buyEntry = crossover(source, BBlower)
sellEntry = crossunder(source, BBupper)
plot(BBbasis, color=aqua,title="Bollinger Bands SMA Basis Line")
p1 = plot(BBupper, color=silver,title="Bollinger Bands Upper Line")
p2 = plot(BBlower, color=silver,title="Bollinger Bands Lower Line")
fill(p1, p2)


///////////// Colors
switch1=input(true, title="Enable Bar Color?")
switch2=input(true, title="Enable Background Color?")
TrendColor = RSIoverBought and (price > BBupper and price < BBupper) and BBbasis < BBbasis ? red : RSIoverSold and (price < BBlower and price > BBlower) and BBbasis > BBbasis ? green : na
barcolor(switch1?TrendColor:na)
bgcolor(switch2?TrendColor:na,transp=50)


///////////// RSI + Bollinger Bands Strategy
if (not na(vrsi))

if (crossover(vrsi, RSIoverSold) and crossover(source, BBlower))
strategy.entry("RSI_BB_L", strategy.long and startTime, stop=BBlower, oca_type=strategy.oca.cancel, comment="RSI_BB_L")
else
strategy.cancel(id="RSI_BB_L")

if (crossunder(vrsi, RSIoverBought) and crossunder(source, BBupper))
strategy.entry("RSI_BB_S", strategy.short and startTime, stop=BBupper, oca_type=strategy.oca.cancel, comment="RSI_BB_S")
else
strategy.cancel(id="RSI_BB_S")

//plot(strategy.equity, title="equity", color=red, linewidth=2, style=areabr)
Répondre
Accueil Screener d'actions Screener Forex Screener Crypto Calendrier économique Comment ça marche Caractéristiques du graphique Prix Parrainer un ami Règles de conduite Centre d'aide Solutions site web & courtier Widgets Solutions de cartographie Bibliothèque de graphiques allégés Blog & News Twitter
Profil Paramètres du Profil Compte et Facturation Parrainer un ami Mes tickets au support Centre d'aide Idées Publiées Followers Suivi(e) Messages privés Chat Se Déconnecter