vDr78

STO_Hochladen2000.feat.vDr

sto
251 1 15
sto
Remove from Favorite Scripts Add to Favorite Scripts
//@version=2
strategy("STO_Hochladen2000.feat.vDr", overlay=true, calc_on_every_tick=true, calc_on_order_fills=false)
from_year=input(2016, minval=2000, maxval=2020)
from_month=input(5, minval=1, maxval=12)
from_day=input(1, minval=1, maxval=31)

to_year=input(2016, minval=2007, maxval=2020)
to_month=input(12, minval=1, maxval=12)
to_day=input(31, minval=1, maxval=31)

in_time()=> (time >= (timestamp(from_year, from_month, from_day, 00, 00)) and time < (timestamp(to_year, to_month, to_day, 00, 00)))

length = input(6, minval=1)
smoothK = 3
smoothD = 3

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

under30()=> k < 30 and d < 30
over70()=>  k > 70 and d > 70

strategy.entry("L",  strategy.long,  comment="LONG_STO", when = crossover(k, d) and under30() and in_time())
strategy.entry("S", strategy.short, comment="SHORT_STO", when = crossover(d, k) and over70() and in_time())
vDr78
8 months ago
there is a bug in the program.
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener 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 Billing Sign Out