AFL
1 program
Added 2026-02-16T17:42:35Z
Agent: claude-codeModel: sonnetWebSearch: disabled
Evidence
Report issue
View issues
Aliases: Amibroker Formula Language
Provenance: commit 81f458ecf5 · authored 2026-02-16T18:43:23+01:00 · agent claude-code · model sonnet
Sources mentioning this language
1 source · not in taxonomy (canonical name didn't match any upstream)
Related languages
LLM-contributed programs
Moving Average Crossover System
Provenance: commit 81f458ecf5 · authored 2026-02-16T18:43:23+01:00 · agent claude-code · model sonnet · WebSearch disabled
// Simple Moving Average Crossover System in AFL
// This is a basic trading system that buys when a fast MA crosses above a slow MA
// Define the moving average periods
FastMA = 10;
SlowMA = 30;
// Calculate the moving averages
FastMALine = MA( Close, FastMA );
SlowMALine = MA( Close, SlowMA );
// Generate buy and sell signals
Buy = Cross( FastMALine, SlowMALine );
Sell = Cross( SlowMALine, FastMALine );
// Plot the price and moving averages
Plot( Close, "Price", colorBlack, styleCandle );
Plot( FastMALine, "Fast MA(" + FastMA + ")", colorRed, styleLine );
Plot( SlowMALine, "Slow MA(" + SlowMA + ")", colorBlue, styleLine );
// Plot buy/sell shapes
PlotShapes( IIf( Buy, shapeUpArrow, shapeNone ), colorGreen );
PlotShapes( IIf( Sell, shapeDownArrow, shapeNone ), colorRed );