Page 1583 of 1981

Re: XARD - Simple Trend Following Trading System

Posted: Wed Jun 26, 2024 7:11 am
by XXXX
Curioso wrote: Tue Jun 25, 2024 10:56 pm LOW RISK :)
Do you watch for the 61.8% ADR retracements?

Re: XARD - Simple Trend Following Trading System

Posted: Wed Jun 26, 2024 7:27 am
by Curioso
XXXX wrote: Wed Jun 26, 2024 7:11 am Do you watch for the 61.8% ADR retracements?
Hello XXXX,

Not really, im stay in position when its valid, when it changed (ex: candle color to grey or green) i´m out.

Re: XARD - Simple Trend Following Trading System

Posted: Wed Jun 26, 2024 2:01 pm
by dacanba
I have been working on tradingview, one of the good things about this platform is that you can immediately backtest the strategies.
Thanks to Chatgpt, I was able to convert the Semaphore indicator from version 4 to version 5. The difference between this indicator and Xard's is that you can choose whether or not you want confirmed signals, thereby avoiding many false signals that end up being repainted.
I asked Chatgpt to take it to MT4, but, I haven't had good results.
I leave you the mq4 file in case someone can fix it.

Este es el codigo en Tradingview

Code: Select all

//@version=5
indicator("Semafor", overlay=true, max_labels_count=300)

repaint = input(true, "Allow Drawing Of Unconfirmed Levels")

zigzag(Depth, Deviation, Color, Size, Type) =>
    var int lw = 1
    var int hg = 1
    lw := lw + 1
    hg := hg + 1
    p_lw = -ta.lowestbars(Depth)
    p_hg = -ta.highestbars(Depth)
    lowing = lw == p_lw or low - low[p_lw] > Deviation*syminfo.mintick
    highing = hg == p_hg or high[p_hg] - high > Deviation*syminfo.mintick
    lh = ta.barssince(not highing)
    ll = ta.barssince(not lowing)
    down = lh > ll
    lower = low[lw] > low[p_lw]
    higher = high[hg] < high[p_hg]
    if lw != p_lw and (not down[1] or lower)
        lw := p_lw < hg ? p_lw : 0
    if hg != p_hg and (down[1] or higher)
        hg := p_hg < lw ? p_hg : 0
    x1 = down ? lw : hg
    y1 = down ? low[lw] : high[hg]
    lb = down ? label.style_label_up : label.style_label_down
    var label point = na
    if repaint
        point := label.new(bar_index-x1, y1, color=Color, style=label.style_circle, size=Size)
        if down == down[1]
            label.delete(point[1])
    if not repaint and down != down[1]
        nx = down ? hg : lw
        point := label.new(bar_index-nx, down ? high[nx] : low[nx], color=Color, style=label.style_circle, size=Size)
    down != down[1]

var switchOn = false
if input(true, "Large")
    switchOn := zigzag(input.int(576, "Depth"), input(5.0, "Deviation"), input(color.red, "Color"), size.large, "Large") or switchOn
if input(true, "Medium")
    switchOn := zigzag(input.int(144, "Depth"), input(6.0, "Deviation"), input(color.orange, "Color"), size.small , "Small") or switchOn
if input(false, "Small")
    switchOn := zigzag(input.int(36, "Depth"), input(3.0, "Deviation"), input(color.lime, "Color"), size.tiny , "Tiny") or switchOn

alertcondition(switchOn, "Semafor Alert", "New Semafor Level Confirmed")
Greetings

Re: XARD - Simple Trend Following Trading System

Posted: Wed Jun 26, 2024 2:33 pm
by dacanba
Only confirmed signals



Signs to be confirmed

Re: XARD - Simple Trend Following Trading System

Posted: Wed Jun 26, 2024 7:05 pm
by Neroloft
heads up guys, possible sell.

Re: XARD - Simple Trend Following Trading System

Posted: Wed Jun 26, 2024 7:13 pm
by lukgoku
dacanba wrote: Wed Jun 26, 2024 2:01 pm I have been working on tradingview, one of the good things about this platform is that you can immediately backtest the strategies.
Thanks to Chatgpt, I was able to convert the Semaphore indicator from version 4 to version 5. The difference between this indicator and Xard's is that you can choose whether or not you want confirmed signals, thereby avoiding many false signals that end up being repainted.
I asked Chatgpt to take it to MT4, but, I haven't had good results.
I leave you the mq4 file in case someone can fix it.

Este es el codigo en Tradingview

Code: Select all

//@version=5
indicator("Semafor", overlay=true, max_labels_count=300)

repaint = input(true, "Allow Drawing Of Unconfirmed Levels")

zigzag(Depth, Deviation, Color, Size, Type) =>
    var int lw = 1
    var int hg = 1
    lw := lw + 1
    hg := hg + 1
    p_lw = -ta.lowestbars(Depth)
    p_hg = -ta.highestbars(Depth)
    lowing = lw == p_lw or low - low[p_lw] > Deviation*syminfo.mintick
    highing = hg == p_hg or high[p_hg] - high > Deviation*syminfo.mintick
    lh = ta.barssince(not highing)
    ll = ta.barssince(not lowing)
    down = lh > ll
    lower = low[lw] > low[p_lw]
    higher = high[hg] < high[p_hg]
    if lw != p_lw and (not down[1] or lower)
        lw := p_lw < hg ? p_lw : 0
    if hg != p_hg and (down[1] or higher)
        hg := p_hg < lw ? p_hg : 0
    x1 = down ? lw : hg
    y1 = down ? low[lw] : high[hg]
    lb = down ? label.style_label_up : label.style_label_down
    var label point = na
    if repaint
        point := label.new(bar_index-x1, y1, color=Color, style=label.style_circle, size=Size)
        if down == down[1]
            label.delete(point[1])
    if not repaint and down != down[1]
        nx = down ? hg : lw
        point := label.new(bar_index-nx, down ? high[nx] : low[nx], color=Color, style=label.style_circle, size=Size)
    down != down[1]

var switchOn = false
if input(true, "Large")
    switchOn := zigzag(input.int(576, "Depth"), input(5.0, "Deviation"), input(color.red, "Color"), size.large, "Large") or switchOn
if input(true, "Medium")
    switchOn := zigzag(input.int(144, "Depth"), input(6.0, "Deviation"), input(color.orange, "Color"), size.small , "Small") or switchOn
if input(false, "Small")
    switchOn := zigzag(input.int(36, "Depth"), input(3.0, "Deviation"), input(color.lime, "Color"), size.tiny , "Tiny") or switchOn

alertcondition(switchOn, "Semafor Alert", "New Semafor Level Confirmed")
Greetings
Hi Dacanba,

maybe it could be an interesting idea and I suggest you post it here as well: MT4 Indicator requests and ideas mt4-indicator-requests-and-ideas-t8418142-20550.html

Re: XARD - Simple Trend Following Trading System

Posted: Wed Jun 26, 2024 8:34 pm
by Neroloft
Neroloft wrote: Wed Jun 26, 2024 7:05 pm heads up guys, possible sell.
aaaand it droped...

Re: XARD - Simple Trend Following Trading System

Posted: Wed Jun 26, 2024 8:36 pm
by moey_dw
Neroloft wrote: Wed Jun 26, 2024 8:34 pm aaaand it droped...
GOOD CALL

Re: XARD - Simple Trend Following Trading System

Posted: Wed Jun 26, 2024 8:43 pm
by Curioso
End of another London session :)

Thank you xard777 with the version post1295543027.html#p1295543027 and lets rock another session.

Re: XARD - Simple Trend Following Trading System

Posted: Wed Jun 26, 2024 9:28 pm
by Samoth
This question has probably been asked dozens of times, but I'll just ask it again. :sweat:

Has anyone ever built an EA for the Xard system?

With all the rules like 2nd dot, below/above daily open, stop loss above/below the last dot or semaphore, take profit when candle turns gray, the system is perfect for this.

I found some old EA's for Xard's system on MQL5 but they don't seem to work anymore. :think: