majestros

Dax ema stochastic trailing points

534 4 35
A strategy for the Dax             using ema stochastic and trail_points =40
Remove from Favorite Scripts Add to Favorite Scripts
//@version=2
strategy("DaxK_Limit", overlay=true)
length = input(14, minval=1)
OverBought = input(52)
OverSold = input(48)
smoothK = 1
smoothD = 3

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

if (not na(k) and not na(d))
    if (crossover(k,d) and k < OverSold)
        strategy.entry("StochLE", strategy.long)
        strategy.exit("StochLE", trail_points=40)
    if (crossunder(k,d) and k > OverBought)
        strategy.entry("StochSE", strategy.short)
        strategy.exit("StochSE",trail_points=40)

//plot(strategy.equity, title="equity", color=red, linewidth=2, style=areabr)
cjszbd
4 months ago
Does this strategy repaint?
Reply
majestros cjszbd
4 months ago
Repaint how? Do you mean incorporate new data as time goes on? I'm sorry I'm new to pine script. How do I do that?
Reply
Entity PRO majestros
4 months ago
Repaint = signals disappear after a certain amount of candles thus difficult to properly backtest. Also The results are misleading with Heikin Ashi candles selected. If you strategy works on normal candles then you have a winner
Reply
majestros Entity
4 months ago
I don't think it repaints and it works on normal candles as well
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