[DMcL] Nadaraya-Watson Kernel

0 45 Views No Comments 2 weeks ago
  • Adapted from jdehorty on tradingview.
    Nadaraya-Watson Kernel in dark green
    Find it works on longer timeframes, 6 Hour etc.
    Added an EMA filter (in aqua), to only take longs in uptrend, shorts downtrend

    Once you have saved the command, this is an example of a script to trade from its signals:

    local alpha = Input('Alpha', 2)
    local r = Input('Relative Weighting', 8)
    local h = Input('Lookback Window', 8)
    local x_0 = Input("Start Regression at Bar", 25)
    local emaFilter = Input('Use EMA Filter', false)
    local emaLength = Input('EMA Length', 200)
    local nwk = CC_Nadaraya_Watson_Kernel(alpha, r, h, x_0, emaFilter, emaLength)
    if nwk == SignalLong then
    if nwk == SignalShort then
    • This topic was modified 2 weeks, 2 days ago by dmaclennan.
    HaasScript Code
    Sign in or Register to download for free
  • Mandala Trading Competition Promotion Type: contest Expires: June 9, 2023 Exclusive
    Trading volume competition, win up to $10,000 USDT and bounties.
  • Earn Up to 200 BMEX Tokens Promotion Type: contest Expires: March 31, 2023
    15 BMEX @ $20,000, 25 BMEX @ $50,000, 50 [email protected] $200,000, 100 BMEX @ $400,000, 200 BMEX @ $600,000 in monthly derivatives volume
Login or Register to Comment

Unlock your crypto trading potential

Create a free account and enjoy everything we have to offer.

Join for Free