Plot All Signals Amibroker AFL

This is yet another simple and useful formula. Add this code after your afl to find FAKE signals.

How to Use:

This is not a AFL strategy but simply template to find fake signals in your strategy. Take the following steps to check if your strategy has any fake signals

  1. In Amibroker, go to Analysis, then Formula Editor
  2. In Formula Editor window, go to File -> Open and open your strategy with buy/sell code.
  3. Scroll down to bottom of code. Copy-paste here code from this strategy template.
  4. Save this file in your computer at location which you easily remember.
  5. Now apply this modified file on the same chart which you applied strategy. Note carefully if any new signals have appeared. If yes, it means that you should be cautious and get your AFL code corrected.

Direct Code for Copy-Paste

PlotShapes( IIf( Buy, shapeSquare, shapeNone ), colorGreen, 0, L, Offset = -40 );
PlotShapes( IIf( Buy, shapeSquare, shapeNone ), colorLime, 0, L, Offset = -50 );
PlotShapes( IIf( Buy, shapeUpArrow, shapeNone ), colorWhite, 0, L, Offset = -45 );
PlotShapes( IIf( Sell, shapeDownArrow, shapeNone ), colorRed, 0, H, Offset = -65 );
PlotShapes( IIf( Short, shapeSquare, shapeNone ), colorRed, 0, H, Offset = 40 );
PlotShapes( IIf( Short, shapeSquare, shapeNone ), colorOrange, 0, H, Offset = 50 );
PlotShapes( IIf( Short, shapeDownArrow, shapeNone ), colorWhite, 0, H, Offset = -45 );
PlotShapes( IIf( Cover, shapeUpArrow, shapeNone ), colorBlue, 0, L, Offset = -65 );