TradeZoro
Notifications

Cookbook

Average cross marks

Arrows when a fast line crosses a slow one.

//@zscript 1
indicator("Cross marks", overlay=true)
fast = ta.ema(close, 9)
slow = ta.ema(close, 21)
plot(fast, "Fast", color=color.green)
plot(slow, "Slow", color=color.red)
plotshape(ta.crossover(fast, slow), "Up", shape.triangleup, location.belowbar, color.green)
plotshape(ta.crossunder(fast, slow), "Down", shape.triangledown, location.abovebar, color.red)
50365042504850535059
Sample bars, not market data. Cross marks.

How it works

ta.crossover(a, b) is true on the bar where a moves from below b to above it. This is a teaching sample of a rule, not a trading system.

Education only. Not financial advice. Examples are teaching samples, not trading results.

Zscript is coming soon

The manual opens when Zscript launches.

Back to home