IMG_0697_Closer

Hi, I’m Dave McLachlan. ¬†Welcome to the site.

I have both formal training and a huge passion for trading and investment methods that work. ¬†While I’m not a coder, I do enjoy figuring things out, and a lot of my work has been made available to you for free. ¬†Some content is for¬†members only.

You can access the:

You can also see the Principles I live and trade by.

Happy trending!

First Time Here?   |   Terms of Use

January 24, 2010   Posted in: Articles On Building Wealth  6 Comments

Amibroker: How to “Scale In” to Positions (2) – Pyramiding Three Times

Line1

Beginners Course  |  Intermediate Course  |  Amibroker Course Home

This is the second video on “Scaling In” to positions using Amibroker Formula Language. ¬†It will give you more tools to use in your own back testing!

Now that we have the basics down, this video will look at how to “pyramid”. ¬†Traditionally, the term “Pyramiding” is used because we are reducing the amount we buy each time. ¬†In other words, we might first buy 1000 shares, then 500, then 250, for example.

This example scales in, or pyramids into positions as long as price is above our Moving Average. As you can imaging, we could end up with LOTS of positions if it’s above the Moving Average for quite some time. ¬†To limit positions I show you how to add a Counter, and we count three positions and then stop buying.

I also show you how to change your position size Рreduce the amount we are buying Рeach time and with each successive pyramid. The idea behind that is we are adding to positions, but not TOO much, as the trend ages and becomes likely to reverse.

Check it out!

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

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)

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

February 7, 2016  Tags: , , , , , ,   Posted in: Amibroker Course  No Comments

Amibroker: How to “Scale In” to Positions (1) – Buying Once a Month

Line1

Beginners Course  |  Intermediate Course  |  Amibroker Course Home

A few people at Youtube and at ASX Market Watch have asked for an Amibroker video on “Scaling In” to positions, or Pyramiding. ¬†In other words, sometimes we may not want to buy out full position on our first entry signal, and may want to increase it over time.

This two-part series will start by looking at the basics of scaling in using Amibroker Formula Language, with a simple Dollar Cost Averaging example.

The rules change just a little bit – instead of simply setting up a “Buy” condition, now we use “If, Then, Else”. ¬†If our buy signal is true, Then Scale In, otherwise (Else) return no signal.

Check out the video and leave a comment below!

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

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)

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

February 7, 2016  Tags: , , , , ,   Posted in: Amibroker Course  2 Comments

Three Trading Systems (Wk 9) – When There’s Nothing Doing, Do Nothing

This excerpt is for educational purposes only and is not to be interpreted as trading or investment advice.  See Terms Of Use here.

I love these times in the market.

It’s almost like a holiday – I can focus on doing other videos, learning more for myself, and (this is the best part) spending more time with my family and actually enjoying life. ¬†Little things like taking off to the beach on the weekends for fish & chips and a wade in the warm, sheltered waters nearby.

With a weekly trading system for myself, and a clear signal that the overall market isn’t ready to be bought yet, I’ve got little to do in the markets. ¬†As a good friend of mine once said: “When there’s nothing doing, do nothing”. ¬†In other words, don’t force it. ¬†Or in the words of Warren Buffett “I don’t look to jump over 7-foot bars: I look around for 1-foot bars that I can step over.”

Not everyone is able to sit idly in times like this.  They want to find ways to make money all the time, which usually results in over-trading Рand losing money instead.

There is another reason these times are a blessing: a down market doesn’t last forever. ¬†During the 2008 Global Financial Crisis it sure felt as though it would last forever, but it eventually ended, and when it did the people with the cash could buy as much of companies that met their entry criteria as their hearts desired. ¬†2009 was a boon year for pretty much everyone. ¬†So having some cash left to buy, and a clear, back-tested method or signal for “when” to buy, is also important.

Golden Cross Index Timer

2016_02_07_Golden Cross Timer

ROC and Moving Average Index Timer

2016_02_07_ROC Index

Three Trading Systems Comparative Returns

The Index – All Ordinaries – is the Yellow line.

2016_02_07_Comparative

As expected Рthe trading systems that hold the most stocks have fared the worst over the last week.  Now, the Leap of Faith trading system has taken the lead by a fraction, as the Dow/Gann trading system has a wider stop loss.  This wide stop loss is great to catch big moves, but it sure hurts a bit when the market moves down.

While I have an “Index Filter”, turning these systems off new positions when the Index is moving down, I don’t have a complete “Off switch”, where a trader might sell all their positions if the Index meets certain criteria.

I have tested a few different combinations over the last two weeks, and using an “Off Switch” certainly reduces draw-downs, but it reduces overall returns as well. ¬†Volatility works both ways – for better¬†in up markets, and for worse in down markets.

If and when my “How To” Amibroker videos start to become fewer each week, I’ll be able to focus more on trading systems and some more research too!

I hope you’ve enjoyed this post. ¬†Have a great week :-)

Happy trending,

– Dave McLachlan

More¬†Posts and Videos in the “Three Trading System” series:

  1. Three Trading Systems (Wk 9) – When There’s Nothing Doing, Do Nothing
  2. Three Trading Systems (Wk8) – Two Additions, Dry Powder and “No Psychics”
  3. Three Trading Systems (Wk7) – Lessons, Ideas, Tests, Drawdowns
  4. Three Trading Systems (Wk 6) – Thank you, Drawdowns, and Trading System Talk
  5. Three Trading Systems Series Week 5 – Can I Ask You a Question?
  6. Three Trading Systems Week 4 – Buys, Sells and YTD Returns
  7. Three Trading Systems Week 3 – Current Trades and YTD Returns
  8. Three Trading Systems Week 2 – Current Trades and YTD Returns
  9. Three Current Trading Systems – Buys and Sells and YTD Returns

February 7, 2016  Tags: , , , , , , ,   Posted in: Trading Diary  No Comments

Amibroker Q & A: Three “Hacks” To Improve Your Coding Skills

Line1

Beginners Course  |  Intermediate Course  |  Amibroker Course Home

Last week I posted an article on how to code five consecutive bars above or below a Moving Average, similar to the way the Trend Pilot trading system is used.

Well, when I figured out how to do it, I figured it out the LONG way.

Two great viewers at my site graciously pointed out a total of three easier ways to code it!  Of course I checked them out myself, and even though it took me a while to understand them, when I finally did I realised how powerful these three faster methods were.

They helped me with my coding – thinking of better ways to code things – and I know they can help you too.

A big thanks to Gordon, and Maurice, and the great Cezar Alvarez, who Maurice credited.

It’s great readers and viewers that help make great things happen. ¬†Thank you so much guys!

3Hacks_1 3Hacks_2

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

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)

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

January 31, 2016  Tags: , , , , ,   Posted in: Amibroker Q & A  No Comments

The Technical View – Current Support and Resistance Levels on World Markets

This excerpt is for educational purposes only and is not to be interpreted as trading or investment advice.  See Terms Of Use here.

This week we look at the world markets, and follow up with the single bar trade that formed a bottom on the S&P 500.  Calling these short term bottoms is one thing (which we did, hallelujah), but actually trading them is another thing entirely.  We look at how some people might manage that trade, as it unfolds.  Brilliant stuff.

We also see why the dynamic Support and Resistance of trend lines works so well – especially against the alternative of straight horizontal support and resistance.

It’s all in the video, check it out!

All Ordinaries

07_All Ordinaries_Support and resistance

S&P 500

07_SP500_Single Bar Entry and Resistance

Shanghai Composite

07_Shanghai Composite_Support and Resistance

BSE 30

07_BSE30_Channel

I hope you have enjoyed this post.  Please leave a comment below!

Happy Trending,

– Dave McLachlan

More videos from the Technical View:

  1. The Technical View – Current Support and Resistance Levels on World Markets
  2. The Technical View – Trading the S&P 500 Single Bar Reversal, plus Big, Heavy Resistance Lines
  3. The Technical View: How to Find a Market Bottom
  4. The Technical View: Targets – Head and Shoulders Compared to 2008 Pattern
  5. The Technical View – World Markets Find Support (and Resistance) at 50%

January 31, 2016  Tags: , , , , , ,   Posted in: The Technical View  No Comments