Indicator · Pine Script v4 · Own pane

AG Screener (Phill_I Request)

by Anderson-ALGO· code credited to Anderson_Guilcapi

This indicator functions as a multi-pair forex screener, drawing output in a separate pane.

View on GitHub

Repaints

GitHub stars9on the repository
Pine versionv4older, still runs
Lines of code218
Settings5inputs
LicenceNone statedfile: MPL-2.0
Last update5 years ago30 Nov 2020

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

218 lines of Pine Script v4 from Pine/PineScript/Requests/SCREENERS_(@Phill_I).pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

SCREENERS_(@Phill_I).pine
// This source code is subject to the terms of the Mozilla Public License 2.i at https://mozilla.org/MPL/2.i/
// © Anderson_Guilcapi

//@version=4

study("|AG| SCREENER (@Phill_I Request)", overlay=false, precision=0)

period  = input(title="Resolution", type=input.resolution, defval="60")
len1    = input(5 , minval=1, title="EMA5-Length" )
len2    = input(13, minval=1, title="EMA13-Length")
len3    = input(50, minval=1, title="EMA50-Length")
_hval   = input(1, title="0 Line Width")

rescale(_src, _oldMin, _oldMax, _newMin, _newMax) =>
    // Rescales series with known min/max.
    // _src: series to rescale.
    // _oldMin: minimum value of series to rescale.
    // _oldMax: maximum value of series to rescale.
    // _newMin: minimum value of rescaled series.
    // _newMax: maximum value of rescaled series.
    _newMin + (_newMax - _newMin) * (_src - _oldMin) / max(_oldMax - _oldMin, 10e-10)

[o_eurusd, h_eurusd, l_eurusd, c_eurusd] = security("EURUSD", period, [open, high, low, close] )
[o_eurgbp, h_eurgbp, l_eurgbp, c_eurgbp] = security("EURGBP", period, [open, high, low, close] )
[o_euraud, h_euraud, l_euraud, c_euraud] = security("EURAUD", period, [open, high, low, close] )
[o_eurnzd, h_eurnzd, l_eurnzd, c_eurnzd] = security("EURNZD", period, [open, high, low, close] )
[o_eurcad, h_eurcad, l_eurcad, c_eurcad] = security("EURCAD", period, [open, high, low, close] )
[o_eurchf, h_eurchf, l_eurchf, c_eurchf] = security("EURCHF", period, [open, high, low, close] )
[o_eurjpy, h_eurjpy, l_eurjpy, c_eurjpy] = security("EURJPY", period, [open, high, low, close] )
[o_gbpusd, h_gbpusd, l_gbpusd, c_gbpusd] = security("GBPUSD", period, [open, high, low, close] )
[o_gbpaud, h_gbpaud, l_gbpaud, c_gbpaud] = security("GBPAUD", period, [open, high, low, close] )
[o_gbpcad, h_gbpcad, l_gbpcad, c_gbpcad] = security("GBPCAD", period, [open, high, low, close] )
[o_gbpchf, h_gbpchf, l_gbpchf, c_gbpchf] = security("GBPCHF", period, [open, high, low, close] )
[o_gbpnzd, h_gbpnzd, l_gbpnzd, c_gbpnzd] = security("GBPNZD", period, [open, high, low, close] )
[o_gbpjpy, h_gbpjpy, l_gbpjpy, c_gbpjpy] = security("GBPJPY", period, [open, high, low, close] )
[o_audusd, h_audusd, l_audusd, c_audusd] = security("AUDUSD", period, [open, high, low, close] )
[o_audcad, h_audcad, l_audcad, c_audcad] = security("AUDCAD", period, [open, high, low, close] )
[o_audnzd, h_audnzd, l_audnzd, c_audnzd] = security("AUDNZD", period, [open, high, low, close] )
[o_audchf, h_audchf, l_audchf, c_audchf] = security("AUDCHF", period, [open, high, low, close] )
[o_audjpy, h_audjpy, l_audjpy, c_audjpy] = security("AUDJPY", period, [open, high, low, close] )
[o_nzdusd, h_nzdusd, l_nzdusd, c_nzdusd] = security("NZDUSD", period, [open, high, low, close] )
[o_nzdjpy, h_nzdjpy, l_nzdjpy, c_nzdjpy] = security("NZDJPY", period, [open, high, low, close] )
[o_nzdcad, h_nzdcad, l_nzdcad, c_nzdcad] = security("NZDCAD", period, [open, high, low, close] )
[o_nzdchf, h_nzdchf, l_nzdchf, c_nzdchf] = security("NZDCHF", period, [open, high, low, close] )
[o_usdcad, h_usdcad, l_usdcad, c_usdcad] = security("USDCAD", period, [open, high, low, close] )
[o_usdchf, h_usdchf, l_usdchf, c_usdchf] = security("USDCHF", period, [open, high, low, close] )
[o_usdjpy, h_usdjpy, l_usdjpy, c_usdjpy] = security("USDJPY", period, [open, high, low, close] )
[o_cadjpy, h_cadjpy, l_cadjpy, c_cadjpy] = security("CADJPY", period, [open, high, low, close] )
[o_cadchf, h_cadchf, l_cadchf, c_cadchf] = security("CADCHF", period, [open, high, low, close] )
[o_chfjpy, h_chfjpy, l_chfjpy, c_chfjpy] = security("CHFJPY", period, [open, high, low, close] )


eurusd = rescale(rsi(c_eurusd,14), 0, 100, -1, 1)
eurgbp = rescale(rsi(c_eurgbp,14), 0, 100, -1, 1)
euraud = rescale(rsi(c_euraud,14), 0, 100, -1, 1)
eurnzd = rescale(rsi(c_eurnzd,14), 0, 100, -1, 1)
eurcad = rescale(rsi(c_eurcad,14), 0, 100, -1, 1)
eurchf = rescale(rsi(c_eurchf,14), 0, 100, -1, 1)
eurjpy = rescale(rsi(c_eurjpy,14), 0, 100, -1, 1)
gbpusd = rescale(rsi(c_gbpusd,14), 0, 100, -1, 1)
gbpaud = rescale(rsi(c_gbpaud,14), 0, 100, -1, 1)
gbpcad = rescale(rsi(c_gbpcad,14), 0, 100, -1, 1)
gbpchf = rescale(rsi(c_gbpchf,14), 0, 100, -1, 1)
gbpnzd = rescale(rsi(c_gbpnzd,14), 0, 100, -1, 1)
gbpjpy = rescale(rsi(c_gbpjpy,14), 0, 100, -1, 1)
audusd = rescale(rsi(c_audusd,14), 0, 100, -1, 1)
audcad = rescale(rsi(c_audcad,14), 0, 100, -1, 1)
audnzd = rescale(rsi(c_audnzd,14), 0, 100, -1, 1)
audchf = rescale(rsi(c_audchf,14), 0, 100, -1, 1)
audjpy = rescale(rsi(c_audjpy,14), 0, 100, -1, 1)
nzdusd = rescale(rsi(c_nzdusd,14), 0, 100, -1, 1)
nzdjpy = rescale(rsi(c_nzdjpy,14), 0, 100, -1, 1)
nzdcad = rescale(rsi(c_nzdcad,14), 0, 100, -1, 1)
nzdchf = rescale(rsi(c_nzdchf,14), 0, 100, -1, 1)
usdcad = rescale(rsi(c_usdcad,14), 0, 100, -1, 1)
usdchf = rescale(rsi(c_usdchf,14), 0, 100, -1, 1)
usdjpy = rescale(rsi(c_usdjpy,14), 0, 100, -1, 1)
cadjpy = rescale(rsi(c_cadjpy,14), 0, 100, -1, 1)
cadchf = rescale(rsi(c_cadchf,14), 0, 100, -1, 1)
chfjpy = rescale(rsi(c_chfjpy,14), 0, 100, -1, 1)

hline(price=0, title="0 Line", color=color.black, linewidth=_hval)


conditions_phill(o_pair, h_pair, l_pair, c_pair)=>
    float EMA1    =   ema(c_pair,len1)
    float EMA2    =   ema(c_pair,len2)
    float EMA3    =   ema(c_pair,len3)
    float _close  =   c_pair
    float _open   =   o_pair   
    float _high   =   h_pair
    float _low    =   l_pair
    float condition          =   iff((_close>_open and _close>_close[1] and _close>_high[1] and _close[1]<_open[1] and EMA1>EMA2),  c_pair, -c_pair )
    float alertcondition     =   iff((_close>_open and _close>_close[1] and _close>_high[1] and _close[1]<_open[1] and EMA1>EMA2),  1, 0 )
    //float Sell    =   iff((_close<_open and _close<_close[1] and _close<_low[1]  and _close[1]>_open[1] and EMA1<EMA2), -c_pair, na )
    [condition, alertcondition]

[eurusd_p, eurusd_alert] = conditions_phill(o_eurusd, h_eurusd, l_eurusd, c_eurusd)
[eurgbp_p, eurgbp_alert] = conditions_phill(o_eurgbp, h_eurgbp, l_eurgbp, c_eurgbp)
[euraud_p, euraud_alert] = conditions_phill(o_euraud, h_euraud, l_euraud, c_euraud)
[eurnzd_p, eurnzd_alert] = conditions_phill(o_eurnzd, h_eurnzd, l_eurnzd, c_eurnzd)
[eurcad_p, eurcad_alert] = conditions_phill(o_eurcad, h_eurcad, l_eurcad, c_eurcad)
[eurchf_p, eurchf_alert] = conditions_phill(o_eurchf, h_eurchf, l_eurchf, c_eurchf)
[eurjpy_p, eurjpy_alert] = conditions_phill(o_eurjpy, h_eurjpy, l_eurjpy, c_eurjpy)
[gbpusd_p, gbpusd_alert] = conditions_phill(o_gbpusd, h_gbpusd, l_gbpusd, c_gbpusd)
[gbpaud_p, gbpaud_alert] = conditions_phill(o_gbpaud, h_gbpaud, l_gbpaud, c_gbpaud)
[gbpcad_p, gbpcad_alert] = conditions_phill(o_gbpcad, h_gbpcad, l_gbpcad, c_gbpcad)
[gbpchf_p, gbpchf_alert] = conditions_phill(o_gbpchf, h_gbpchf, l_gbpchf, c_gbpchf)
[gbpnzd_p, gbpnzd_alert] = conditions_phill(o_gbpnzd, h_gbpnzd, l_gbpnzd, c_gbpnzd)
[gbpjpy_p, gbpjpy_alert] = conditions_phill(o_gbpjpy, h_gbpjpy, l_gbpjpy, c_gbpjpy)
[audusd_p, audusd_alert] = conditions_phill(o_audusd, h_audusd, l_audusd, c_audusd)
[audcad_p, audcad_alert] = conditions_phill(o_audcad, h_audcad, l_audcad, c_audcad)
[audnzd_p, audnzd_alert] = conditions_phill(o_audnzd, h_audnzd, l_audnzd, c_audnzd)
[audchf_p, audchf_alert] = conditions_phill(o_audchf, h_audchf, l_audchf, c_audchf)
[audjpy_p, audjpy_alert] = conditions_phill(o_audjpy, h_audjpy, l_audjpy, c_audjpy)
[nzdusd_p, nzdusd_alert] = conditions_phill(o_nzdusd, h_nzdusd, l_nzdusd, c_nzdusd)
[nzdjpy_p, nzdjpy_alert] = conditions_phill(o_nzdjpy, h_nzdjpy, l_nzdjpy, c_nzdjpy)
[nzdcad_p, nzdcad_alert] = conditions_phill(o_nzdcad, h_nzdcad, l_nzdcad, c_nzdcad)
[nzdchf_p, nzdchf_alert] = conditions_phill(o_nzdchf, h_nzdchf, l_nzdchf, c_nzdchf)
[usdcad_p, usdcad_alert] = conditions_phill(o_usdcad, h_usdcad, l_usdcad, c_usdcad)
[usdchf_p, usdchf_alert] = conditions_phill(o_usdchf, h_usdchf, l_usdchf, c_usdchf)
[usdjpy_p, usdjpy_alert] = conditions_phill(o_usdjpy, h_usdjpy, l_usdjpy, c_usdjpy)
[cadjpy_p, cadjpy_alert] = conditions_phill(o_cadjpy, h_cadjpy, l_cadjpy, c_cadjpy)
[cadchf_p, cadchf_alert] = conditions_phill(o_cadchf, h_cadchf, l_cadchf, c_cadchf)
[chfjpy_p, chfjpy_alert] = conditions_phill(o_chfjpy, h_chfjpy, l_chfjpy, c_chfjpy)

//ALERTS ARE NOT POSSIBLE IN ALL PAIRS SINCE THE MAXIMUM OF OUTPUTS IN PINE IS 64 ADDING THIS WITH RETURN ERROR
//BUT HERE IS THE WAY IN WHICH ALERTS COULD BE SELEECTED
//https://www.pinecoders.com/faq_and_code/#how-many-plots-security-calls-variables-or-lines-of-code-can-i-use

//ALERTS FOR BUY
//alertcondition(eurusd_alert==1, title="BUY eurusd ALERT", message= "BUY eurusd ALERT {{c_eurusd}}")
//alertcondition(eurgbp_alert==1, title="BUY eurgbp ALERT", message= "BUY eurgbp ALERT {{c_eurgbp}}")
//alertcondition(euraud_alert==1, title="BUY euraud ALERT", message= "BUY euraud ALERT {{c_euraud}}")
//alertcondition(eurnzd_alert==1, title="BUY eurnzd ALERT", message= "BUY eurnzd ALERT {{c_eurnzd}}")
//alertcondition(eurcad_alert==1, title="BUY eurcad ALERT", message= "BUY eurcad ALERT {{c_eurcad}}")
//alertcondition(eurchf_alert==1, title="BUY eurchf ALERT", message= "BUY eurchf ALERT {{c_eurchf}}")
//alertcondition(eurjpy_alert==1, title="BUY eurjpy ALERT", message= "BUY eurjpy ALERT {{c_eurjpy}}")
//alertcondition(gbpusd_alert==1, title="BUY gbpusd ALERT", message= "BUY gbpusd ALERT {{c_gbpusd}}")
//alertcondition(gbpaud_alert==1, title="BUY gbpaud ALERT", message= "BUY gbpaud ALERT {{c_gbpaud}}")
//alertcondition(gbpcad_alert==1, title="BUY gbpcad ALERT", message= "BUY gbpcad ALERT {{c_gbpcad}}")
//alertcondition(gbpchf_alert==1, title="BUY gbpchf ALERT", message= "BUY gbpchf ALERT {{c_gbpchf}}")
//alertcondition(gbpnzd_alert==1, title="BUY gbpnzd ALERT", message= "BUY gbpnzd ALERT {{c_gbpnzd}}")
//alertcondition(gbpjpy_alert==1, title="BUY gbpjpy ALERT", message= "BUY gbpjpy ALERT {{c_gbpjpy}}")
//alertcondition(audusd_alert==1, title="BUY audusd ALERT", message= "BUY audusd ALERT {{c_audusd}}")
//alertcondition(audcad_alert==1, title="BUY audcad ALERT", message= "BUY audcad ALERT {{c_audcad}}")
//alertcondition(audnzd_alert==1, title="BUY audnzd ALERT", message= "BUY audnzd ALERT {{c_audnzd}}")
//alertcondition(audchf_alert==1, title="BUY audchf ALERT", message= "BUY audchf ALERT {{c_audchf}}")
//alertcondition(audjpy_alert==1, title="BUY audjpy ALERT", message= "BUY audjpy ALERT {{c_audjpy}}")
//alertcondition(nzdusd_alert==1, title="BUY nzdusd ALERT", message= "BUY nzdusd ALERT {{c_nzdusd}}")
//alertcondition(nzdjpy_alert==1, title="BUY nzdjpy ALERT", message= "BUY nzdjpy ALERT {{c_nzdjpy}}")
//alertcondition(nzdcad_alert==1, title="BUY nzdcad ALERT", message= "BUY nzdcad ALERT {{c_nzdcad}}")
//alertcondition(nzdchf_alert==1, title="BUY nzdchf ALERT", message= "BUY nzdchf ALERT {{c_nzdchf}}")
//alertcondition(usdcad_alert==1, title="BUY usdcad ALERT", message= "BUY usdcad ALERT {{c_usdcad}}")
//alertcondition(usdchf_alert==1, title="BUY usdchf ALERT", message= "BUY usdchf ALERT {{c_usdchf}}")
//alertcondition(usdjpy_alert==1, title="BUY usdjpy ALERT", message= "BUY usdjpy ALERT {{c_usdjpy}}")
//alertcondition(cadjpy_alert==1, title="BUY cadjpy ALERT", message= "BUY cadjpy ALERT {{c_cadjpy}}")
//alertcondition(cadchf_alert==1, title="BUY cadchf ALERT", message= "BUY cadchf ALERT {{c_cadchf}}")
//alertcondition(chfjpy_alert==1, title="BUY chfjpy ALERT", message= "BUY chfjpy ALERT {{c_chfjpy}}")
////ALERTS FOR SELL
//alertcondition(eurusd_alert==0, title="SELL eurusd ALERT", message= "SELL eurusd ALERT {{c_eurusd}}")
//alertcondition(eurgbp_alert==0, title="SELL eurgbp ALERT", message= "SELL eurgbp ALERT {{c_eurgbp}}")
//alertcondition(euraud_alert==0, title="SELL euraud ALERT", message= "SELL euraud ALERT {{c_euraud}}")
//alertcondition(eurnzd_alert==0, title="SELL eurnzd ALERT", message= "SELL eurnzd ALERT {{c_eurnzd}}")
//alertcondition(eurcad_alert==0, title="SELL eurcad ALERT", message= "SELL eurcad ALERT {{c_eurcad}}")
//alertcondition(eurchf_alert==0, title="SELL eurchf ALERT", message= "SELL eurchf ALERT {{c_eurchf}}")
//alertcondition(eurjpy_alert==0, title="SELL eurjpy ALERT", message= "SELL eurjpy ALERT {{c_eurjpy}}")
//alertcondition(gbpusd_alert==0, title="SELL gbpusd ALERT", message= "SELL gbpusd ALERT {{c_gbpusd}}")
//alertcondition(gbpaud_alert==0, title="SELL gbpaud ALERT", message= "SELL gbpaud ALERT {{c_gbpaud}}")
//alertcondition(gbpcad_alert==0, title="SELL gbpcad ALERT", message= "SELL gbpcad ALERT {{c_gbpcad}}")
//alertcondition(gbpchf_alert==0, title="SELL gbpchf ALERT", message= "SELL gbpchf ALERT {{c_gbpchf}}")
//alertcondition(gbpnzd_alert==0, title="SELL gbpnzd ALERT", message= "SELL gbpnzd ALERT {{c_gbpnzd}}")
//alertcondition(gbpjpy_alert==0, title="SELL gbpjpy ALERT", message= "SELL gbpjpy ALERT {{c_gbpjpy}}")
//alertcondition(audusd_alert==0, title="SELL audusd ALERT", message= "SELL audusd ALERT {{c_audusd}}")
//alertcondition(audcad_alert==0, title="SELL audcad ALERT", message= "SELL audcad ALERT {{c_audcad}}")
//alertcondition(audnzd_alert==0, title="SELL audnzd ALERT", message= "SELL audnzd ALERT {{c_audnzd}}")
//alertcondition(audchf_alert==0, title="SELL audchf ALERT", message= "SELL audchf ALERT {{c_audchf}}")
//alertcondition(audjpy_alert==0, title="SELL audjpy ALERT", message= "SELL audjpy ALERT {{c_audjpy}}")
//alertcondition(nzdusd_alert==0, title="SELL nzdusd ALERT", message= "SELL nzdusd ALERT {{c_nzdusd}}")
//alertcondition(nzdjpy_alert==0, title="SELL nzdjpy ALERT", message= "SELL nzdjpy ALERT {{c_nzdjpy}}")
//alertcondition(nzdcad_alert==0, title="SELL nzdcad ALERT", message= "SELL nzdcad ALERT {{c_nzdcad}}")
//alertcondition(nzdchf_alert==0, title="SELL nzdchf ALERT", message= "SELL nzdchf ALERT {{c_nzdchf}}")
//alertcondition(usdcad_alert==0, title="SELL usdcad ALERT", message= "SELL usdcad ALERT {{c_usdcad}}")
//alertcondition(usdchf_alert==0, title="SELL usdchf ALERT", message= "SELL usdchf ALERT {{c_usdchf}}")
//alertcondition(usdjpy_alert==0, title="SELL usdjpy ALERT", message= "SELL usdjpy ALERT {{c_usdjpy}}")
//alertcondition(cadjpy_alert==0, title="SELL cadjpy ALERT", message= "SELL cadjpy ALERT {{c_cadjpy}}")
//alertcondition(cadchf_alert==0, title="SELL cadchf ALERT", message= "SELL cadchf ALERT {{c_cadchf}}")
//alertcondition(chfjpy_alert==0, title="SELL chfjpy ALERT", message= "SELL chfjpy ALERT {{c_chfjpy}}")

/////////////////////////PLOT FOR THE SCANNER
plotshape(eurusd_p, style=shape.circle, location=location.absolute, color=#4363d8, textcolor=color.black, show_last=1, text="EURUSD"  , offset=-7     , transp=0, title="EURUSD Label", size=size.small)
plotshape(eurgbp_p, style=shape.circle, location=location.absolute, color=#4363d8, textcolor=color.black, show_last=1, text="EURGBP"  , offset=-1     , transp=0, title="EURGBP Label", size=size.small)
plotshape(euraud_p, style=shape.circle, location=location.absolute, color=#4363d8, textcolor=color.black, show_last=1, text="EURAUD"  , offset=-2     , transp=0, title="EURAUD Label", size=size.small)
plotshape(eurnzd_p, style=shape.circle, location=location.absolute, color=#4363d8, textcolor=color.black, show_last=1, text="EURNZD"  , offset=-3     , transp=0, title="EURNZD Label", size=size.small)
plotshape(eurcad_p, style=shape.circle, location=location.absolute, color=#4363d8, textcolor=color.black, show_last=1, text="EURCAD"  , offset=-4     , transp=0, title="EURCAD Label", size=size.small)
plotshape(eurchf_p, style=shape.circle, location=location.absolute, color=#4363d8, textcolor=color.black, show_last=1, text="EURCHF"  , offset=-5     , transp=0, title="EURCHF Label", size=size.small)
plotshape(eurjpy_p, style=shape.circle, location=location.absolute, color=#4363d8, textcolor=color.black, show_last=1, text="EURJPY"  , offset=-6     , transp=0, title="EURJPY Label", size=size.small)
plotshape(gbpusd_p, style=shape.circle, location=location.absolute, color=#00E676, textcolor=color.black, show_last=1, text="GBPUSD"  , offset=+1     , transp=0, title="GBPUSD Label", size=size.small)
plotshape(gbpaud_p, style=shape.circle, location=location.absolute, color=#00E676, textcolor=color.black, show_last=1, text="GBPAUD"  , offset=+2     , transp=0, title="GBPAUD Label", size=size.small)
plotshape(gbpcad_p, style=shape.circle, location=location.absolute, color=#00E676, textcolor=color.black, show_last=1, text="GBPCAD"  , offset=+3     , transp=0, title="GBPCAD Label", size=size.small)
plotshape(gbpchf_p, style=shape.circle, location=location.absolute, color=#00E676, textcolor=color.black, show_last=1, text="GBPCHF"  , offset=+4     , transp=0, title="GBPCHF Label", size=size.small)
plotshape(gbpnzd_p, style=shape.circle, location=location.absolute, color=#00E676, textcolor=color.black, show_last=1, text="GBPNZD"  , offset=-5     , transp=0, title="GBPNZD Label", size=size.small)
plotshape(gbpjpy_p, style=shape.circle, location=location.absolute, color=#00E676, textcolor=color.black, show_last=1, text="GBPJPY"  , offset=+6     , transp=0, title="GBPJPY Label", size=size.small)
plotshape(audusd_p, style=shape.circle, location=location.absolute, color=#FF5252, textcolor=color.black, show_last=1, text="AUDUSD"  , offset=+7     , transp=0, title="AUDUSD Label", size=size.small)
plotshape(audcad_p, style=shape.circle, location=location.absolute, color=#FF5252, textcolor=color.black, show_last=1, text="AUDCAD"  , offset=+8     , transp=0, title="AUDCAD Label", size=size.small)
plotshape(audnzd_p, style=shape.circle, location=location.absolute, color=#FF5252, textcolor=color.black, show_last=1, text="AUDNZD"  , offset=+9     , transp=0, title="AUDNZD Label", size=size.small)
plotshape(audchf_p, style=shape.circle, location=location.absolute, color=#FF5252, textcolor=color.black, show_last=1, text="AUDCHF"  , offset=+10    , transp=0, title="AUDCHF Label", size=size.small)
plotshape(audjpy_p, style=shape.circle, location=location.absolute, color=#FF5252, textcolor=color.black, show_last=1, text="AUDJPY"  , offset=+11    , transp=0, title="AUDJPY Label", size=size.small)
plotshape(nzdusd_p, style=shape.circle, location=location.absolute, color=#E040FB, textcolor=color.black, show_last=1, text="NZDUSD"  , offset=-7     , transp=0, title="NZDUSD Label", size=size.small)
plotshape(nzdjpy_p, style=shape.circle, location=location.absolute, color=#E040FB, textcolor=color.black, show_last=1, text="NZDJPY"  , offset=-8     , transp=0, title="NZDJPY Label", size=size.small)
plotshape(nzdcad_p, style=shape.circle, location=location.absolute, color=#E040FB, textcolor=color.black, show_last=1, text="NZDCAD"  , offset=-9     , transp=0, title="NZDCAD Label", size=size.small)
plotshape(nzdchf_p, style=shape.circle, location=location.absolute, color=#E040FB, textcolor=color.black, show_last=1, text="NZDCHF"  , offset=-10    , transp=0, title="NZDCHF Label", size=size.small)
plotshape(usdcad_p, style=shape.circle, location=location.absolute, color=#2196F3, textcolor=color.black, show_last=1, text="USDCAD"  , offset=-11    , transp=0, title="USDCAD Label", size=size.small)
plotshape(usdchf_p, style=shape.circle, location=location.absolute, color=#2196F3, textcolor=color.black, show_last=1, text="USDCHF"  , offset=-12    , transp=0, title="USDCHF Label", size=size.small)
plotshape(usdjpy_p, style=shape.circle, location=location.absolute, color=#2196F3, textcolor=color.black, show_last=1, text="USDJPY"  , offset=-13    , transp=0, title="USDJPY Label", size=size.small)
plotshape(cadjpy_p, style=shape.circle, location=location.absolute, color=#E040FB, textcolor=color.black, show_last=1, text="CADJPY"  , offset=+12    , transp=0, title="CADJPY Label", size=size.small)
plotshape(cadchf_p, style=shape.circle, location=location.absolute, color=#E040FB, textcolor=color.black, show_last=1, text="CADCHF"  , offset=+13    , transp=0, title="CADCHF Label", size=size.small)
plotshape(chfjpy_p, style=shape.circle, location=location.absolute, color=#E040FB, textcolor=color.black, show_last=1, text="CHFJPY"  , offset=+14    , transp=0, title="CHFJPY Label", size=size.small)

Overview

AG Screener (Phill_I Request) fetches price data across major currency pairs using security functions based on a user-selected resolution timeframe. It processes these market feeds with short, medium, and long-term exponential moving averages to evaluate multi-currency trend alignment. Users can customize the calculation timeframe resolution and the individual lengths of the three EMAs. Note that security calls on higher timeframes will update dynamically on unclosed bars.

Details

Published by

Anderson-ALGO on GitHub

Code credit

Anderson_Guilcapi, as written in the script's header

Type

Indicator, Pine Script v4

Draws

Separate pane below the chart

Category

Screeners & dashboards, Trend, Moving averages

Markets

Forex

Timeframes

Any timeframe

Risk Notes

  • Signals can change on the live bar or after it closes (repainting)

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Resolutiontimeframe60period
EMA5-Lengthint5len1
EMA13-Lengthint13len2
EMA50-Lengthint50len3
0 Line Widthint1_hval
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

218 stars

Multi-Timeframe Analysis Suite calculates trend direction and momentum conditions across five user-selected timeframes using moving averages, RSI, and Stochastic oscillators. It evaluates moving average slope and oscillator levels to compute trend alignment, m

Indicator v6 Screeners & dashboardsTrend
Updated 3 months ago · None stated GitHub repository of Multi-Timeframe Analysis Suite

KamaFama

by Mastaaa1987
141 stars

KamaFama is an indicator that translates a Freqtrade trading strategy into Pine Script for visualization. It combines Kaufman Adaptive Moving Average (KAMA), MAMA/FAMA calculations derived via Hilbert Transform, Williams %R, and correlation trend filters to ev

Indicator v6 Moving averagesOscillators & momentum
Updated 6 weeks ago · MIT GitHub repository of KamaFama
10 stars

This indicator combines SuperGuppy exponential moving average ribbons with SuperTrend pivot points in a separate pane screener. It classifies up to twenty assets as neutral, long, strong long, short, or strong short. Fast and slow EMA stacks define trend align

Indicator v4 TrendMoving averages
Updated 4 years ago · MIT GitHub repository of SuperGuppySTPPScreener

MTF WaveTrend Opportunity Hunter calculates multi-timeframe momentum and confluence scores using WaveTrend across custom Regime, Setup, Trigger, and Context timeframes. It plots a net confluence score histogram, multi-layer heat ribbons, an RRG-style Rotation

Indicator v6 TrendOscillators & momentum
Updated yesterday · MIT GitHub repository of MTF WaveTrend Opportunity Hunter [WavesUnchained]
92 stars

This indicator plots five moving averages of a chosen source on the price chart, defaulting to EMA lengths 10, 20, 30, 40 and 50. The user can switch the average type to SMA, WMA or HMA and recolor each line. Wide translucent glows sit under the lines, and sof

Indicator v5 TrendMoving averages
Updated 8 weeks ago · Custom licence GitHub repository of Moon Dev Rainbow MA Ribbon 10-50

EMA Ribbon Overlay

by iamrichardD
57 stars

Calculates exponential moving averages for fast, pivot, and slow lengths along with optional 50, 100, and 200 simple moving average context lines. It visualizes bullish and bearish ribbon fills on the main price chart alongside MACD calculations to generate ea

Indicator v6 TrendMoving averages
Updated 1 year ago · Apache-2.0 GitHub repository of EMA Ribbon Overlay

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers