Estratégias de Trading: Charles e Alex
Estratégias de Trading: Charles e Alex
//@versão=2
estudo("Charles", sobrepor=true)
EMAlength=input(55,"EMA LENGTH?")
src=ohlc4
haOpen=0.0
haOpen := (src + nz(haOpen[1]))/2
haC=(ohlc4+nz(haOpen)+max(high,nz(haOpen))+min(low,nz(haOpen)))/4
EMA1=ema(haC,EMAlength)
EMA2=ema(EMA1,ComprimentoEMA)
EMA3=ema(EMA2,EMAlength)
//fórmula 1
PA1=3*EMA1-3*EMA2+EMA3
EMA4=ema(PA1,ComprimentoEMA)
EMA5=ema(EMA4, comprimentoEMA)
EMA6=ema(EMA5,EMAlength)
//fórmula 2
PA2=3*EMA4-3*EMA5+EMA6
GA1=PA1-PA2
YASIN=PA1+GA1
EMA7=ema(hlc3, ComprimentoEMA)
EMA8=ema(EMA7,EMAlength)
EMA9=ema(EMA8, comprimentoEMA)
//Formula 3
PA3=3*EMA7-3*EMA8+EMA9
EMA10=ema(PA3,EMAlength)
EMA11=ema(EMA10,EMAlength)
EMA12=ema(EMA11,EMAlength)
//Fórmula 4
PA4=3*EMA10-3*EMA11+EMA12
GA2=PA3-PA4
YASIN1=PA3+GA2
mavi=YASIN1
kirmizi=YASIN
last_signal = 0
long_final = longCond and (nz(last_signal[1]) == 0 or nz(last_signal[1]) == -1)
short_final = shortCond and (nz(last_signal[1]) == 0 or nz(last_signal[1]) == 1)
//==============================================
//ALEX
//@versão=4
study(title="Alex", shorttitle="KIV BUY ALLIN SELL", overlay=true)
//RSI
// Obter entrada do usuário
rsiSource = input(title="RSI Source", type=[Link], defval=close)
rsiLength = input(title="RSI Length", type=[Link], defval=14)
rsiOverbought = input(title="RSI Overbought Level", type=[Link], defval=80)
rsiOversold = input(title="RSI Oversold Level", type=[Link], defval=20)
// Obter valor RSI
rsiValue = rsi(rsiSource, rsiLength)
isRsiOB = rsiValue >= rsiOverbought
isRsiOS = rsiValue <= rsiOversold
// Traçar sinais no gráfico
//plotshape(isRsiOB, title="Sobrecomprado", location=[Link],
OB
//plotshape(isRsiOS, title="Sobrevendido", location=[Link],
color=[Link], transp=0, style=[Link], text="OS")
//EMA9
ema9 = ema(close,9)
plot(ema9, cor=[Link], largura=3)
//MACD
[macdLine, signalLine, histLine] = macd(close, 12, 26, 14)
//plot(macdLine, color=[Link])
//plot(sinalLinha, cor=[Link])
//plot(histLine, color=[Link], estilo=plot.estilo_histograma)
//EMA
//plot(ema(fechar, 15))
Banda de Bollinger
[meio, superior, inferior] = bb(fechamento, 20, 2)
Estocástico
stochValueK = stoch(close, high, low, 14)
stochValueD = stoch(close, high, low, 3)
Força Relativa RS
BUY2 = close >= highest(close, 20) and high > high[1] and close > open and volume >
volume[1] e fechamento > meio e superior > superior[1] e superior[1] > superior[2] e
middle > middle[1] and middle[1] > middle [2]
plotshape(BUY2, title="BUY", location=[Link], color=[Link],
transp=0, style=[Link], text="Alex HOOT", textcolor=[Link])
BUY3 = close > sma(close,50) and sma(close,50) > sma(close,150) and sma(close,150)
> sma(fechar,200) e fechar > (mais baixo(fechar,260)*1.3) e fechar >
(máximo(preço,260) - (máximo(preço,260)*0,25))
plotshape(BUY3, title="Tendência de Alta", location=[Link], color=[Link],
J LAW UP