Page 1873 of 2170

Re: MT4 Indicator requests and ideas

Posted: Tue Jun 13, 2023 3:29 pm
by josi
Chickenspicy wrote: Tue Jun 13, 2023 2:33 am please add alerts to this
If you add the inversal of the line in the subwindow it may even become useful for trading...

Re: MT4 Indicator requests and ideas

Posted: Tue Jun 13, 2023 9:08 pm
by ROI
josi wrote: Tue Jun 13, 2023 3:29 pm If you add the inversal of the line in the subwindow it may even become useful for trading...
Image
It seems to me, that it will print arrow when crossing zeroline. Looks good, and maybe does not repaint, because signal bar is 1. Tankk has these kind of indicators.

Re: MT4 Indicator requests and ideas

Posted: Tue Jun 13, 2023 9:28 pm
by sal
ROI wrote: Tue Jun 13, 2023 9:08 pm It seems to me, that it will print arrow when crossing zeroline. Looks good, and maybe does not repaint, because signal bar is 1. Tankk has these kind of indicators.
bro.. its after refresh the arrow disappear or relocate.. dont trust without close check!

Re: MT4 Indicator requests and ideas

Posted: Tue Jun 13, 2023 10:46 pm
by ROI
sal wrote: Tue Jun 13, 2023 9:28 pm bro.. its after refresh the arrow disappear or relocate.. dont trust without close check!
That`s why I said maybe. It recalculates when you hit refresh so to say.

Re: MT4 Indicator requests and ideas

Posted: Wed Jun 14, 2023 4:48 am
by wojtek
guys, come on, this is solar wind... ;)

Re: MT4 Indicator requests and ideas

Posted: Wed Jun 14, 2023 4:51 am
by Chickenspicy
i use 2 bar confirm on 4hr chart with price action and fundamental trend seem okay with good risk to reward
false signal from repaint or false signal for non repaint your choice ultimately if follow trend should be okay

Re: MT4 Indicator requests and ideas

Posted: Wed Jun 14, 2023 5:01 am
by wojtek
Everything which helps you to make profit is OK. :)

Re: MT4 Indicator requests and ideas

Posted: Wed Jun 14, 2023 5:28 am
by Chickenspicy
you can find profit even in trash
difficult but still possible

Re: MT4 Indicator requests and ideas

Posted: Wed Jun 14, 2023 5:55 am
by Chickenspicy
This looks impressive

Code: Select all

  // This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/
// © LuxAlgo

//@version=5
indicator("Pivot Based Trailing Maxima & Minima [LuxAlgo]",overlay=true,max_bars_back=500,max_lines_count=500)
length = input.int(14,minval=2,maxval=500)

max_color = input.color(color.teal,'Trailing Maximum Color',group='Style')
min_color = input.color(color.red,'Trailing Minimum Color',group='Style')
avg_color = input.color(#ff5d00,'Trailing Maximum Color',group='Style')

bull_fill = input.color(color.new(color.teal,80),'Uptrend Area',group='Style')
bear_fill = input.color(color.new(color.red,80),'Downtrend Area',group='Style')
//----
var max = 0.
var min = 0.

ph = ta.pivothigh(length,length)
pl = ta.pivotlow(length,length)

if ph or pl
    max := high[length]
    min := low[length]

max := math.max(high[length],max)
min := math.min(low[length],min)

avg = math.avg(max,min)

//----
plot1 = plot(max,'Trailing Maximum',ph or pl ? na : max_color,1,plot.style_linebr,offset=-length)
plot2 = plot(min,'Trailing Minimum',ph or pl ? na : min_color,1,plot.style_linebr,offset=-length)

fill_css = fixnan(ph ? bear_fill : pl ? bull_fill : na)
fill(plot1,plot2,ph or pl ? na : fill_css)

plot(avg,'Average',ph or pl ? na : avg_color,1,plot.style_linebr,offset=-length)

plotshape(pl ? pl : na,"Pivot High",shape.labelup,location.absolute,max_color,-length,text="▲",textcolor=color.white,size=size.tiny)
plotshape(ph ? ph : na,"Pivot Low",shape.labeldown,location.absolute,min_color,-length,text="▼",textcolor=color.white,size=size.tiny)

//----
n = bar_index

max_prev = max
min_prev = min
avg_prev = avg
max2 = max
min2 = min

if barstate.islast
    for line_object in line.all
        line.delete(line_object)

    for i = 0 to length-1
        max2 := math.max(high[length-1-i],max_prev)
        min2 := math.min(low[length-1-i],min_prev)
        avg2 = math.avg(max2,min2)
        
        line1 = line.new(n-(length-i),max_prev,n-(length-1-i),max2,color=max_color)
        line2 = line.new(n-(length-i),min_prev,n-(length-1-i),min2,color=min_color)
        linefill.new(line1,line2,color.new(fill_css,80))
        
        line.new(n-(length-i),avg_prev,n-(length-1-i),avg2,color=avg_color)
        
        max_prev := max2
        min_prev := min2
        avg_prev := avg2

Re: MT4 Indicator requests and ideas

Posted: Wed Jun 14, 2023 9:07 pm
by ffsss
Chickenspicy wrote: Wed Jun 14, 2023 5:55 am This looks impressive

Code: Select all

  // This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/
// © LuxAlgo

//@version=5
indicator("Pivot Based Trailing Maxima & Minima [LuxAlgo]",overlay=true,max_bars_back=500,max_lines_count=500)
length = input.int(14,minval=2,maxval=500)

max_color = input.color(color.teal,'Trailing Maximum Color',group='Style')
min_color = input.color(color.red,'Trailing Minimum Color',group='Style')
avg_color = input.color(#ff5d00,'Trailing Maximum Color',group='Style')

bull_fill = input.color(color.new(color.teal,80),'Uptrend Area',group='Style')
bear_fill = input.color(color.new(color.red,80),'Downtrend Area',group='Style')
//----
var max = 0.
var min = 0.

ph = ta.pivothigh(length,length)
pl = ta.pivotlow(length,length)

if ph or pl
    max := high[length]
    min := low[length]

max := math.max(high[length],max)
min := math.min(low[length],min)

avg = math.avg(max,min)

//----
plot1 = plot(max,'Trailing Maximum',ph or pl ? na : max_color,1,plot.style_linebr,offset=-length)
plot2 = plot(min,'Trailing Minimum',ph or pl ? na : min_color,1,plot.style_linebr,offset=-length)

fill_css = fixnan(ph ? bear_fill : pl ? bull_fill : na)
fill(plot1,plot2,ph or pl ? na : fill_css)

plot(avg,'Average',ph or pl ? na : avg_color,1,plot.style_linebr,offset=-length)

plotshape(pl ? pl : na,"Pivot High",shape.labelup,location.absolute,max_color,-length,text="▲",textcolor=color.white,size=size.tiny)
plotshape(ph ? ph : na,"Pivot Low",shape.labeldown,location.absolute,min_color,-length,text="▼",textcolor=color.white,size=size.tiny)

//----
n = bar_index

max_prev = max
min_prev = min
avg_prev = avg
max2 = max
min2 = min

if barstate.islast
    for line_object in line.all
        line.delete(line_object)

    for i = 0 to length-1
        max2 := math.max(high[length-1-i],max_prev)
        min2 := math.min(low[length-1-i],min_prev)
        avg2 = math.avg(max2,min2)
        
        line1 = line.new(n-(length-i),max_prev,n-(length-1-i),max2,color=max_color)
        line2 = line.new(n-(length-i),min_prev,n-(length-1-i),min2,color=min_color)
        linefill.new(line1,line2,color.new(fill_css,80))
        
        line.new(n-(length-i),avg_prev,n-(length-1-i),avg2,color=avg_color)
        
        max_prev := max2
        min_prev := min2
        avg_prev := avg2
Must repaint like hell right?