majestros

Dax ema stochastic trailing points

1992 views
102
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)

Comments

Does this strategy repaint?
Reply
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 majestros
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
I don't think it repaints and it works on normal candles as well
Reply
mmtopcu majestros
@majestros, still does it work?
Reply
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Referred friends Coins My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out