Re: XARD - Simple Trend Following Trading System

15822
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.
These users thanked the author Curioso for the post (total 4):
Neroloft, XXXX, LorenzoNexus, Mundu19
Every entry into the market is a reflection of your courage. Every goal you overcome, however small it may seem, is a firm step towards your dreams.

Re: XARD - Simple Trend Following Trading System

15823
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
These users thanked the author dacanba for the post:
lukgoku


Re: XARD - Simple Trend Following Trading System

15826
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
The best things in life are free!

Re: XARD - Simple Trend Following Trading System

15830
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:
These users thanked the author Samoth for the post:
Andreas2000