You are on page 1of 3

//CHARLES

//@version=2

study("Charles", overlay=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,EMAlength)
EMA3=ema(EMA2,EMAlength)

//formula 1
PA1=3*EMA1-3*EMA2+EMA3

EMA4=ema(PA1,EMAlength)
EMA5=ema(EMA4,EMAlength)
EMA6=ema(EMA5,EMAlength)

//formula 2
PA2=3*EMA4-3*EMA5+EMA6
GA1=PA1-PA2
YASIN=PA1+GA1

EMA7=ema(hlc3,EMAlength)
EMA8=ema(EMA7,EMAlength)
EMA9=ema(EMA8,EMAlength)

//Formula 3
PA3=3*EMA7-3*EMA8+EMA9

EMA10=ema(PA3,EMAlength)
EMA11=ema(EMA10,EMAlength)
EMA12=ema(EMA11,EMAlength)

//Formula 4
PA4=3*EMA10-3*EMA11+EMA12
GA2=PA3-PA4
YASIN1=PA3+GA2

mavi=YASIN1
kirmizi=YASIN

longCond=mavi>kirmizi and mavi[1]<=kirmizi[1]


shortCond=mavi<kirmizi and mavi[1]>=kirmizi[1]

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)

alertcondition(long_final, title="buy alarm", message="buy signal!!!")


alertcondition(short_final, title="sell alarm", message="sell signal!!!")
last_signal := long_final ? 1 : short_final ? -1 : last_signal[1]

plotshape(long_final, location=location.belowbar, color=black, title="ok


beli",style=shape.triangleup, text="Charles Buy" ,textcolor=black)
plotshape(short_final, location=location.abovebar, color=red,title="ok
sell",style=shape.triangledown, text="PK",textcolor=red)

//==============================================

//ALEX
//@version=4
study(title="Alex", shorttitle="KIV BUY ALLIN SELL", overlay=true)

//RSI
// Get user input
rsiSource = input(title="RSI Source", type=input.source, defval=close)
rsiLength = input(title="RSI Length", type=input.integer, defval=14)
rsiOverbought = input(title="RSI Overbought Level", type=input.integer, defval=80)
rsiOversold = input(title="RSI Oversold Level", type=input.integer, defval=20)
// Get RSI value
rsiValue = rsi(rsiSource, rsiLength)
isRsiOB = rsiValue >= rsiOverbought
isRsiOS = rsiValue <= rsiOversold
// Plot signals to chart
//plotshape(isRsiOB, title="Overbought", location=location.abovebar,
color=color.red, transp=0, style=shape.triangledown, text="OB")
//plotshape(isRsiOS, title="Oversold", location=location.belowbar,
color=color.green, transp=0, style=shape.triangleup, text="OS")

//EMA9
ema9 = ema(close,9)
plot(ema9,color=color.blue, linewidth=3)

//Highest High and Lowest Low


highestHigh = highest(high, 50)
lowestLow = lowest(low, 50)
//plot(highestHigh, color=color.red, linewidth=1)
//plot(lowestLow, color=color.blue, linewidth=1)

//MACD
[macdLine, signalLine, histLine] = macd(close, 12, 26, 14)
//plot(macdLine, color=color.blue)
//plot(signalLine, color=color.orange)
//plot(histLine, color=color.red, style=plot.style_histogram)

//EMA
//plot(ema(close, 15))

//Bollinger Band
[middle, upper, lower] = bb(close, 20, 2)

//Stochastic
stochValueK = stoch(close, high, low, 14)
stochValueD = stoch(close, high, low, 3)

//Relative Strength RS

BUY = macdLine >= signalLine and macdLine > macdLine[1] and rsiValue > 30 and
rsiValue < 70 and rsiValue > rsiValue[1] and close > open and histLine > 0 and
histLine > histLine[1] and stochValueK > stochValueD and stochValueK <80 and close
> sma(close,50) and sma(close,50) > sma(close,150) and sma(close,150) >
sma(close,200) and close > (lowest(close,260)*1.3) and close > (highest(close,260)
- (highest(close,260)*0.25))
plotshape(BUY, title="KIV", location=location.belowbar, color=color.blue, transp=0,
style=shape.labelup, text="Indicator BUY", textcolor=color.white)

BUY2 = close >= highest(close, 20) and high > high[1] and close > open and volume >
volume[1] and close > middle and upper > upper[1] and upper[1] > upper [2] and
middle > middle[1] and middle[1] > middle [2]
plotshape(BUY2, title="BUY", location=location.belowbar, color=color.yellow,
transp=0, style=shape.labelup, text="Alex HOOT", textcolor=color.black)

BUY3 = close > sma(close,50) and sma(close,50) > sma(close,150) and sma(close,150)
> sma(close,200) and close > (lowest(close,260)*1.3) and close >
(highest(close,260) - (highest(close,260)*0.25))
plotshape(BUY3, title="Uptrend", location=location.abovebar, color=color.blue,
transp=0, style=shape.labelup, text="J LAW UP", textcolor=color.white)

//ema(close,50) > ema(close,100) and ema(close,100) > ema(close,150)

You might also like