Re: MT4 Indicator requests and ideas

18731
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?
These users thanked the author ffsss for the post:
Chickenspicy


Re: MT4 Indicator requests and ideas

18732
How it should work: I enter the status of the account for which the action should be performed. After exceeding this state, the profile on which the code is located switches to another profile. The described function can be performed by an indicator as well as an advisor. This indicator is unreliable. Can anyone help?

Examples of using the indicator: I have a €1000 account. I enter the value of €1100 into the indicator. After reaching this state, the indicator switches the current profile to a clean profile. This will disconnect all EAs that are on the current profile. I can put an EA called CloseAllOpenAndPendingOrders on the new profile. Then after reaching €1100, all orders will be closed and all EAs will be cancelled.


Re: MT4 Indicator requests and ideas

18738
optionhk wrote: Fri Jul 28, 2017 9:58 pm Dear Mladen,

I have a request for modification of your MT5 indicator (Candles_parbitrary_seconds 8_1.1 to use it for making a price action matrix of different pairs.

KIndly include symbol in it .

I will download it 8 times changing the symbol each time and pile up in a matrix style to compare manually and trade if at least four or six or two (selected by me) line up in same direction to catch volatility spike quickly.

I have used MT4 indicator this way because it has symbol , mirror (for easy comparision for EURGBP indicator like ) and TF input facility.

If MT5 seconds chart will not allow symbol matrix visualisation, may I request you to just have the indicator send alerts by push/email when XXX pairs (selected by users) line up in same direction.

If this is also consuming too much time yours, please just include symbol, mirror and and TF input .

Thank you as always for your kind help and generosity.
Image

this guy i think had it
0 + 0 = 0
Infinite / Infinite = 1
1 way to Heaven & it matters


Who is online

Users browsing this forum: Applebot [Crawler], Bing [Bot], Facebook [Crawler], kvak, LevFJX, TEAMTRADER, Yandex [Bot] and 90 guests