Minggu, 17 Januari 2010

A free e-book

... after reading the title of this post you're probably thinking that I made an e-boook and I'm giving it away for free. Not. Maybe one day. I want to give you another hint on finding books.

Earlier I wrote about finding free e-books using Google "
Free ebook for everyone - how to find free books online". Go to that post and read the instructions, and become familiar with Googles advanced search.

A while back I read this post by RiskAddict
"Example Trading System" and went to the link he provided to download the e-book. It wouldn't let me get the book, something about maximum limit reached. So I went up to the Google tool bar and typed in "book" and selected "search site" from the Google drop down menu. From there I browsed through the hits and selected the PDF.

Here is the link that Google spit out, download the PDF while it's still there -
How to develop a futures trading system ebook

10 tips from the website with the book;
  1. Do not feel compelled to always have a trade on or to trade everyday. Capital preservation is the key to successful trading and sometimes that just means waiting when the odds are not in your favour. Throughout all my years of investing I've found that the big money was never made in the buying or the selling. The big money was made in the waiting." Jesse Livermore
  2. Develop your own proven trading system - accept that losing trades will be part of that system.
  3. Do not let
fear and greed influence your trading decisions.
  • Trading is a business, be strategic and logical.
  • Learn something new everyday that will help to maintain or increase your edge.
  • Keep a trading journal and review why your actual trades vary from your trading plan.
  • Do not fight the market, it's easier to run with the wind than against it.
  • Always trade with a stop loss and never move that stop further away or remove it completely. Do not allow a day trade to become a long term investment.
  • Become an expert, know your market inside out. Be it options, futures or an individual stock - you should strive to become the World authority in it!
  • The market will rarely do what it 'should' be doing. Instead focus on what it is doing.
  • Rabu, 13 Januari 2010

    Playback to Bracket Trader

    There are two ways to backtest that I know of using Amibroker;
    Use the backtester
    use the playback feature

    Backtester - This requires some coding, coding that isn't required when trading live with Amibroker, Bracket Trader, and TWS. You have to watch out for a whole basket of different issues that can creep into the test. It remains a valuable tool.

    Playback simulation - This is a great tool for practicing discretionary trading. It's also a great tool for testing your Bracket trader (BT) interface / system. If it would just work! I searched high and low and the net for some information on how to do this, or code that I could simply drop into Ami that would "make it happen". The good news is that I've finally got it to work, and surprisingly it wasn't to difficult to code, but getting the bug out was an issue.

    Ive used it to test several days of 1 minute HSI system with BT to get the stats from it. The last thing I just completed tonight was exiting positions near the close. Still a few issues to work out with that. Still, the most difficult part is finding a system that generates a profit, I'm looking for a winning ratio of 40% or better.

    Is anyone else using Amibroker playback in this fashion?

    I was contemplating doing a video on this and posting the code. Not sure I want to spend the time to do it though.

    Selasa, 01 Desember 2009

    HSI System

    I'd like to start by saying that the formatting of the text doesn't work very well, and I don't feel like sitting here screwing around with formatting.
    Since the last post I've been working on a trading system aimed specifically at the Hang Seng HSI trading on the Hong Long exchange. While developing the signals and code to support the trading system I've also discretionary traded MHI, the mini version of HSI. In addition I've been chatting with Steve from California and Mr RiskAddict from Japan, as you can see in the chat window on the right. If you're interested in autotrading I suggest you visit Mr. Addict's blog. BTW, Mr Addict mentioned this trading system file, and I think you should read it.
    My AFL code is organized into blocks like this;
    Filters - setting available in the params window
    • allowable trading times
    • shorting and buying switches to allow me to turn ON/OFF shorting or buying
    Backtest parameters including a ON/OFF switch in the params window

    Systems
    This is blocks of code that are the sub-systems that make up the entire system of auto trading code. In the params window I have the ability to turn the sub-systems ON/OFF as well as set the order type for each system individually. See screen shot below.

    Plot
    This code lets me turn ON/OFF the plotting of the signals and some moving averages.

    Test
    Code that allows an instant order to be sent out as well as a test for writing a cancel order to Bracket Trader (BT)

    Bracket Trader Code block for writing the text file that BT reads. I just purchased BT, allowing me to add my own symbols and change the audio alerts.
    Backtest plot and code
    This chunk of code allows the plotting of backtest results and simulates scaling out with an initial order of 3 cars (contracts). The plotting code tells me why the position was exited, it shows different shapedigits depending on things like stopped out, trail hit, profit target, etc.

    Title code

    Debug code
    Sends specific into to DebugView

    The System
    The actual "system" consists of a bunch of sub-systems which I'll explain briefly. Here's an interesting wrinkle though - if System 1 buys and has hit 2 targets and is trailing the 3rd car, then system 2 shorts, the short is ignored. Signals are only taken once I'm flat. I call this letting the profits run and I'm OK with that because I do get wrong signals.
    The system buys 3 cars, has an initial stop, 3 separate targets and a trailing stop. Here is how it works for now, subject to change without notice;
    Buy 3 cars
    set initial stop at 15
    1st target at 10
    2nd target at 20
    3rd target at 50
    move stop to BE at 1st target
    trail at 2nd target
    While I've been watching this system fire off signals and debugging it in the fly it's been profitable on simulation but I don't trust it just yet (profitable doesn't count the buggy entry's at market when it shouldn't have fired off a signal but did). I still need to do a successful backtest. I have backtested but haven't been happy with the code result of scaling out, needs some work. I also need some data and I'm working on obtaining that. So far it all looks promising. If the system turns out to be 'not so good', I'll have code that I can simply insert another system, or add to it.
    I am considering manually firing BT based on the codes, I'll try that on sim, I don't think I can match the speed of the auto system though, even with BT at my fingertips.
    Sub-Systems
    A brief description of each;
    1 Find a trend and jump in
    2 Find a channel, or a cycle, and jump in
    3 Find the momentum and go the other way - fade it
    4 Find a MA that has reverses and jump in
    5 Find two indicators going the same way and jump in
    Each one of the above has it's own set of filters, for example, #4 doesn't just blindly jump in, it looks for some other stuff.
    I don't know if this post will help anyone, that isn't my intent. I needed to write it down to better digest it. If it helps you, great.

    Related Posts Plugin for WordPress, Blogger...