Amibroker Advanced: How to Compare Equity Curves


Beginners Course  |  Intermediate Course  |  Amibroker Course Home

This lesson is certainly more advanced than the ones we started with, but that also means you get to take your Amibroker Formula Language to a new level.

You might have seen a comparison of Trading System Equity Curves in a glossy brochure for a mutual fund (or Managed Fund, in Australia), or from a Trading System vendor.  This is how you do it in Amibroker, and once you’ve set it up, it’s very easy to access or modify it in the future.

We use a few functions we’ve done lessons for previously, like AddToComposite, Plot, and Foreign.  We go over them again here, but all the links for those are below too.

Check it out!

As you will see we take five steps:

  1. Create your trading system, as per normal
  2. Get access to the BackTester “object”, so we can extract information from it
  3. Extract the Equity Curve info from the BackTester object
  4. Send that to a new, separate ticker, using AddToComposite
  5. Bring any of the tickers you create into one graph using Foreign, and Plot

Hope you enjoyed, and happy trending 🙂

– Dave McLachlan

Beginners Course  |  Intermediate Course  |  Amibroker Course Home

Videos in the FREE Amibroker Course:

  1. Amibroker: How To Import A Watchlist With A CSV File
  2. Amibroker: How To Backtest A Single Stock Or Index
  3. Amibroker: How To Backtest a Portfolio or Group of Stocks
  4. Amibroker: How To Optimize A Trading System
  5. Amibroker: How To Scan The Market For Buy And Sell Signals
  6. Amibroker: How To Use Explore To Find And Filter Stocks
  7. Amibroker: How To Add Position Sizing Using AFL
  8. Amibroker: How to Add An Index Filter To Your Trading System Using AFL
  9. Amibroker: How To Plot Your Trading System On A Chart (incl. Buy/Sell Arrows)
  10. Amibroker: How to Use the If, Then Else Function (IIF)
  11. Amibroker: How to Code the ATR Trailing Stop (Chandelier) using ApplyStop
  12. Amibroker: How to Plot ApplyStop on a Chart
  13. Amibroker: How to Code Van Tharp Position Sizing (Fixed Fractional)
  14. Amibroker: How to “Scale In” to Positions (1) – Buying Once a Month
  15. Amibroker: How to “Scale In” to Positions (2) – Pyramiding Three Times
  16. Amibroker: How to Use “Cross”, When One Thing Crosses Another
  17. Amibroker Advanced: How to Compare Equity Curves

FREE Trading System Video Lessons:

  1. 7 Free Trading Systems and Their Returns From The Last 13 Years
  2. Seven Full Trading Systems Revisited, With Completely New Data
  3. Trading System: How to Create A Buy and Hold Trading System
  4. Trading System: How to Code “Sell In May And Go Away”
  5. Trading System: How to Code a Moving Average Channel That Made 23% p.a
  6. Trading System: How to Code Highest Highs As Used In 52 Week Highs Or Turtle Trading System
  7. Trading System: How to Code a Bollinger Band Breakout Trading System
  8. Trading System: How to Code a Moving Average Crossover That Returned 28% per annum
  9. Trading System: How to Refer to Previous Signals For MAup Trading System
  10. Trading System: How to Code the Leap Of Faith (Gaps) Trading System That Returned 24% p.a.
  11. Trading System: How to Code a Short Selling System (Plus Results)
  12. Trading System: Meb Faber Trading System Using Different Timeframes
  13. Trading System: How to Code the Three Billion Dollar Trading System

FREE Amibroker Q & A Videos:

  1. Amibroker Q & A: How To Do A Monte Carlo Test? (on ALL versions)
  2. Amibroker Q & A: Visualising Monte Carlo Data with Histograms and Scatter Plots
  3. Amibroker Q & A: How to Create the 52 Week High/Low Index with AddToComposite
  4. Amibroker Q & A: How to Code Trend Pilot: Five Consecutive Days Above or Below a Moving Average
  5. Amibroker Q & A: Three “Hacks” To Improve Your Coding Skills
  6. Amibroker Q & A: How to Remove Excess Signals

Read Related Articles:

  And, subscribe for free to stay in touch and receive the latest updates:

Enter Your Email Address:

(Check Your Junk Mail, Just In Case)

March 6, 2016  Tags: , , , , , ,   Posted in: Amibroker Course

3 Responses

  1. LP - March 12, 2016

    Dave, the squiggle line ~ is called a TILDE. I believe having at least one Tilde is mandatory in AmiBroker when creating an AddToComposite.

  2. LP - March 12, 2016

    I forgot to mention the why: composites MUST start with tilde so they are added at the end of the symbol list not to mess up with the ordering (i.e. the alphabetic order)

  3. David McLachlan - March 13, 2016

    Thanks LP! Nice one. Now I can add Tilde to my vocabulary!

    Cheers – Dave

Leave a Reply