Saturday, November 10, 2007

Amibroker Code - Zero Lag

I'm working on a bit of code that will plot a small line at recent high and lows in an attempt to highlight the "highest highs" and "lowest lows". I find that my eye doesn't catch that too quick, and that I have to stare at a chart for a while to determine what the trend is. I also know why I haven't learned to pick it up as quick as others, I don't "practice" enough. This is the main reason I'm trying to build a system, so I don't have to watch for trades all day long.... I can't anyways, I have a day job.

Here is some code I use called the "Zero Lag". I discovered this at and modified it a bit. Enjoy.

When I post the code directly to the blog, the HTML screws up some of the text. Rather than figure out what the HTML switch is to post just text, I have posted the code to google docs.

Zero Lag Code


  1. I get an Error 29 in line:

    downbar=(PR <>= MoveAvg AND PR< Ref(PR,-1)

  2. Well the lines is exactly in:
    downbar variable.

    barcolor = IIf( downbar,colorRed, IIf( upbar, colorBrightGreen, 7));

  3. Find and pick some good things from you and it aids me to solve a problem, thanks.

    - Henry


Let's hear what you have to say!


The information presented on this site is for educational and entertainment purposes only. This site contains no suggestions or instructions that you must follow, do your own research and due diligence before committing your cash to the markets. Your on your own.