Radio
Événements
Concours
Passez sur Nostalgie
Musique & souvenirs
AFL code can run without syntax errors but still produce incorrect results due to logical mistakes, array index mismatches, or hidden assumptions. This guide provides a step-by-step verification methodology.
Exploration allows you to view your variables in a spreadsheet format. This is the standard for verifying backtest logic. amibroker afl code verified
// Visual Debugging
Plot(C, "Price", colorDefault, styleCandle);
Plot(MA(C,10), "MA Fast", colorGreen, styleLine);
Plot(MA(C,50), "MA Slow", colorRed, styleLine);
Do you have a specific strategy logic (like a crossover or breakout) that you'd like to see converted into a verified AFL template? Guide: Verifying AmiBroker AFL Code 1
Many unverified scripts ignore position sizing, margin requirements, or round lot constraints. They assume you can buy 0.001 shares of a $2,000 stock. Verified code includes SetPositionSize and RoundLotSize logic to mirror brokerage realities. Red flag: The system shows zero trades on
// Signal Logic rsiVal = RSI( period ); Buy = Cross( rsiVal, buyLevel ); Sell = Cross( 70, rsiVal );
Run on a chart. Compare Bars value with expected bar count for the symbol/interval.