FX:USDJPY   U.S. Dollar/Japanese Yen
171 1 1
//Break Out level by Leonardo Ciaccio 2014 ----------------
study(shorttitle="PBKO 2.2", title="Progressive Break Out 2.2", overlay=true)
//---------------------------------------------------------

//Input from user -----------------------------------------
length = input(120, minval=1)
src             = close, len             = input(12, minval=1, title="RSI Length")
STOCA_length = input(5, minval=1), smoothK = input(3, minval=1), smoothD = input(3, minval=1)
//---------------------------------------------------------

//---------------------------------------------------------
upper = highest(length)
lower = lowest(length)

k = sma ( stoch (close, high, low, STOCA_length), smoothK)
d = sma (k, smoothD)

FIBO_0_50 = (upper-lower)*0.5
FIBO_0_764 = (upper-lower)*0.764
FIBO_0_618 = (upper-lower)*0.618

Stoca_K = (upper-lower)*(k/100)
Stoca_D = (upper-lower)*(d/100)

plot(upper, color=olive, title='Upper')
plot(lower, color=red, title='Lower')

plot(lower+FIBO_0_764, color=#8DB8E3, title='FIBO 0.764/0.236')
plot(lower+FIBO_0_618, color=#51C44D, title='FIBO 0.618/0.382')
plot(lower+FIBO_0_50, color=#4C4EC2, title='Fibo 0.5', style=cross)
plot(upper-FIBO_0_618, color=#51C44D, title='FIBO 0.382/0.618')
plot(upper-FIBO_0_764, color=#8DB8E3, title='FIBO 0.236/0.764')
plot(lower+Stoca_K, color=blue, title='Stoca K')
plot(lower+Stoca_D, color=red, title='Stoca D')
//---------------------------------------------------------
Nice piece of code mate. You might explain a bit what gives entry signals to people not familiar with Stochastics. Is there a particular reason why you plot the 50 fib with crosses?
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia
日本
한국
Home Stock Screener Forex Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Account and Billing Sign Out