//@version=6
indicator("P_syn_alerts_log")
cond = ta.crossover(close, ta.sma(close, 20))
alertcondition(cond, "Cross up", "Price crossed above SMA")
if cond
alert("crossed " + str.tostring(close), alert.freq_once_per_bar)
if barstate.islastconfirmedhistory
log.info("last confirmed bar {0}", bar_index)
log.warning("warn")
log.error("err")
if bar_index < 0
runtime.error("never")
plot(cond ? 1 : 0)
Overview
When a crossover occurs, it triggers an alert condition, executes a dynamic alert call with the current close price, and plots a value of 1 (and 0 otherwise) in a separate pane. It also tests Pine Script v6 logging functions by outputting info, warning, and error messages on the last confirmed historical bar. The script has no user-configurable inputs.
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.
This indicator calculates a modified MACD oscillator and signal line alongside a trend EMA filter, plotting the output as a stylized column histogram in a separate pane. Instead of plotting true MACD distance, it quantifies positive and negative histogram mome
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
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
MultiIndicator combines multiple technical indicators into a single separate pane to save chart space. It calculates and displays market regime detection based on ordinary least squares regression, a Holt exponential smoothing crossover, normalized RSI, ADX, a
Calculates the Archer Moving Averages Trends (AMAT) indicator by comparing fast and slow Exponential Moving Averages (EMAs) alongside their slope directions. A bullish trend (+1) is identified when the fast EMA exceeds the slow EMA with both rising, while a be
This indicator plots two simple moving averages of close, one over five bars and one over twenty bars, in a separate pane. It shades the area between the two plots green when the shorter average is above the longer average and red when it is below. There are n