New Text Document
New Text Document
input_group {
"Filter | Fast MA",
colorFastMaline = input { default = rgba(4, 252, 38, 0.80), type = input.color
},
widthFastMaline = input { default = 1, type = input.line_width },
showFastMAFilter = input { default = false, type = input.plot_visibility },
}
input_group {
"Filter | Medium MA",
colorMediumMaline = input { default = rgba(252, 4, 34, 0.80), type =
input.color },
widthMediumMaline = input { default = 1, type = input.line_width },
showMediumMAFilter = input { default = false, type = input.plot_visibility },
}
input_group {
"Filter | Slow MA",
colorSlowMaline = input { default = rgba(156, 155, 155, 0.80), type =
input.color },
widthSlowMaline = input { default = 1, type = input.line_width },
showSlowMAFilter = input { default = false, type = input.plot_visibility },
}
254 -- SuperTrend
255 local atr = rma(tr, SPd)
256 local h = hl2 - (SFactor * atr)
257 local l = hl2 + (SFactor * atr)
258 local atr_ts = iff(close[1] > nz(atr_ts[1], 0) and close[1] > nz(atr_ts[1], 0),
259 max(nz(atr_ts[1], 0), h - atr),
260 iff(close[1] < nz(atr_ts[1], 0) and close[1] < nz(atr_ts[1], 0),
261 min(nz(atr_ts[1], 0), l + atr),
262 atr_ts[1])
263 )
264 local pos = iff(close[1] > nz(atr_ts[1], 0) and close[1] > nz(atr_ts[1], 0), 1,
265 iff(close[1] < nz(atr_ts[1], 0) and close[1] < nz(atr_ts[1], 0), -1,
nz(pos[1], 0)))
266
267 local STrend = pos
268 local Tsl = atr_ts
269 -- Entry
270 local entries = {
271 { name = "Candle X SMA5", func = CandleXSMA5 },
272 { name = "Candle X DC", func = CandleXDC },
273 { name = "Candle X SuperTrend", func = CandleXSuperTrend },
274 { name = "SMA3 X DC", func = SMA3XDC },
275 { name = "SMA3 X SuperTrend", func = SMA3XSuperTrend },
276 { name = "RRRGG/GGRR", func = RRRGG },
277 { name = "Engulfing", func = Engulfing },
278 { name = "Hammer/Shooting", func = HammerShooting },
279 { name = "Candle X out BB", func = CandleXOutBB },
280 { name = "Fractal", func = Fractal },
281 { name = "Big Pips", func = BigPips },
282 { name = "Rejection BB", func = RejectionBB },
283 { name = "MACD Cross", func = MACDCross }
284 }
403 return {
404 -- Your return values if needed
405 }
406 -- Additional Calculations and Logic
407 -- Add any specific calculations or logic required for your indicators
872 table.sort(newfilterUp)
873 table.sort(newfilterDn)