Simple moving average Experimental
AFL → Cuprel · converter amibroker-afl 0.1.0 · converted · 4 lines out
Source (AFL)
Plot(MA(Close, 20), "MA", 1);
Converted (Cuprel)
indicator("Converted indicator", edition = 1, overlay = false)
let tmp_1 = tech.sma(close, 20)
plot(tmp_1, name = "MA")
Known differences
- where a formula is drawn (the price chart or its own pane) is a setting of the platform, not part of the text: the converted indicator is drawn in its own pane
- the converted indicator has no title in the text: it is called "Converted indicator" (rename it in the editor)
- the platform computes whole arrays and may chart only a margin of history; the converted indicator runs bar by bar over the history the product loads, so values near the start of the history can differ
- the platform recalculates the forming bar on every tick; the converted indicator follows the product language (the forming bar can differ)
- MA: the bars before the window is full are not documented; the converted indicator follows the product language (no value there)
- plot colours are numbers that go through a palette the member may have changed: they are not converted (the converted plot uses the default colour)
Experimental means: the converter reads a thin, tested slice, adds warnings, and says no when it is unsure. Run the converted program on your own data before relying on it.