How to Build an Automated Trading System

Discussion in 'Automated Trading' started by greaterreturn, Sep 14, 2008.

Thread Status:
Not open for further replies.
  1. ehorn

    ehorn

    These "laterals" are a type of internal. There is one condition on level 1 cases (The 1st of 3 additions in Spyders diagram) and it is called an Even Harmonic. All others occur at level 2 and require > 2 bars to form but typically stem from level 1 case internals (i.e. Pennants) . This topic is also discussed quite a bit in the Futures Journal and IR thread. Currently, my model is inconsistent in its recognition and annotation of these, because there are cases where an variation (lateral movement) may occur which has to do with a bars close in relation to the previous bar high/low. Laterals typically appear on the scene as non-dominant formations.
     
    #71     Sep 18, 2008
  2. Brief comment. I lost a post due to attaching an illegal attachment.

    Let's start with getting connected.

    [​IMG]

    As has been documented by many many people,I cannot communicate or teach (see the list of negative critiques of my communication).

    Above are three boxes. A is price B is volume. I use a more complex box ordinarily; it has two kinds of inputs and assorted kinds of outputs. This may work for BPA.

    I work from a foundation upon which are built levels and the levels are comprised of building blocks. Each level is completed before the next level is begun.

    I use about 675 words as my vocabulary. A definition is on three vertical levles and three horizontal levels. In this way I have an Excel association of words. I use five colors for words to classify them. This all contributes to my poor communication, apparently.

    ehorn has posted a chart. You and he have posted a chart, each. He has Element A and B on his chart. He can work with C because A and B feed C. The charts have 1 common element (A) The charts are different in that your chart is missing an element (B) so far.

    To be able to do C in BPA. Two elements, A and B are needed. C cannot be put into BPA if there is not A and B.

    In this thread there is an example by a person who does BPA professionally. He saved 95% of worker input on accounts payable by using BPA to make accounts payable into a refinable BPR whcih he refined. The company operates better as a consequence.

    the Trader is the company. Accounts payable is A and B. By doing, BPA on A and B, the trader can do C better which is his job as of now.

    A BPA tream needs to do A and B so it is there for the company (the trader).

    In 2007, there was a syllabus. JAN and FEB were spent on A and B annotation. We DID BPA on people and gave them differentiated minds in A and B.
     
    #72     Sep 18, 2008
  3. Automated trading is often discussed in ET and commonly people talk about coding languages and how to do shortcuts to get to final products in terms of having ATS's.

    Snippets and scripts are also common conversation pieces. as has been pointed out they are found all over the place and in many different codes.

    Also there are many user friendly sites for doing drag and drop to build almost anything imaginable.

    This thead is oriented to using two particular techniques to be creative. They were explained.

    Passing it forward is a version of BPA and BPR where the ATS is built into a person's mind if the mind is available. Neuroplasticity is the umbrella of how the mind is loaded up with the interactive parts. Looking into the mechanics of mind building, the primary thing that goes on over time is building a physical system that is based on differentiation.

    The process of doing the human BPA was done over the years: PVT has it's journals and SCT was loaded up in the months of 2007. The Syllabus was announced at the begining of 2007.

    2008 is being spent on BPR for participating people's minds and catch up BPA for newer people's minds.

    By looking at all the happenings over the years, it becomes very clear that a lot is invloved in transference.and a lot is involved in performance after the intial transference.

    In cardiac artery disease stabilization and reversal two aspects of transference are considered very important. They do not actually apply to BPA and BPR but they do apply for transference. The result is an informed and operational (five sectors of activity come into being) patient. There is no automation.

    The patient listens to the providers and the patient does not offer information to the provider unless the provider solicts information.

    In BPA a product is being built. There is no patient so to speak.
    The builder is like a contractor. He works from a design (the available information in the public eye for doing BPA construction); and he adapts his work to the application (markets) and practices (trader ways of doing things) and gets construction materials (snippets and script) and uses fasteners (coding rules) to complete the structure.

    When the switch is flipped, the BPR begins as iterative refinement of the design, the snippets and scripts, and the fastenings already set up AND especially making the practices more effective and efficient in the selected application.

    Bingo. We already know how it turns out so it is a very good thing to do a round of BPA followed by a round of BPR.
     
    #73     Sep 18, 2008
  4. ehorn

    ehorn

    Well I do not want to disappoint the geeks out there like me :) (coder stuff coming up here), or sidetrack the discussion, but I thought I would share my candidate model for storage of channel information. I have created a class called ChannelModule which is comprised of 4 structs (Channel, TrendLine, Line and cPoint) like this;
    Code:
        public struct Channel
        {
            public TrendLine L1;	//level 1 channel
            public TrendLine L2;	//level 2 channel	
            public TrendLine L3;	//level 3 channel
        }
    
    
        public struct TrendLine
        {
            public Line RTL;	// right trendline
            public Line LTL;	// left trendline
            public List<Line> VE;       // a collection of n VE's per channel
        }
    
        public struct Line
        {
            public cPoint p1;	//point 1
            public cPoint p2;	//point 2
            public cPoint pN;	//future point (next bar look ahead stuff)
            public cPoint pF;	//way in the future point
            public Trend trend;	//trend of the line 
                               	//(Trend is an enum (Up, Down, Neutral))
            public System.Drawing.Color color; //what color to draw the trendline
        }
    
        public struct cPoint
        {
            public int x;		//time coordinate
            public float y;		//price coordinate
            public string note;	//note container for annotation purposes 
    	        	//(stuff like PT1, PT2, VE, BO, FTT, etc...)
        }
    
    
    This structure allows me to store all three levels in one instance without requiring iteration through a collection at any time t. I like the structure of the codebase as it seems simple (KISS). Here is a snippet of the level 1 calcs for RTL of an uptrend. It is fairly self descriptive :) Just a little sample algebra here - (y=mX+b (slopes and stuff)).

    Code:
    this._shell.L1.RTL.p1.x = lastBar.BarNumber;
    this._shell.L1.RTL.p1.y = lastBar.Low;
    
    this._shell.L1.RTL.p2.x = thisBar.BarNumber;
    this._shell.L1.RTL.p2.y = thisBar.Low;
    
    this._shell.L1.RTL.pN.x = thisBar.BarNumber + 1;
    m = ((Shell.L1.RTL.p2.y - Shell.L1.RTL.p1.y) / (Shell.L1.RTL.p2.x - Shell.L1.RTL.p1.x));
    yi = Shell.L1.RTL.p1.y - (m * Shell.L1.RTL.p1.x);
    this._shell.L1.RTL.pN.y = (((Shell.L1.RTL.p2.y - Shell.L1.RTL.p1.y) 
    / (Shell.L1.RTL.p2.x - Shell.L1.RTL.p1.x)) * Shell.L1.RTL.pN.x) + yi;
    
    My goal has been to describe the model in a way that will let me write natural language for analysis and decision. I think this proposed model will make it nice and clean to call in analysis. Each element within a tick (or bar) collection will have a property called Channels and looks like:
    Code:
    Bar.Channels.Shell.L2.RTL.pN.y   // price for the next bar RTL threshold of the traverse (L2)
    Anyway, dont want to sidetrack or litter the thread, but I thought I would throw it up for any geeks out there like me. Any feedback on the OO stuff (not too deep though please...) :)

    P.S. Jack threw out a jem of a hint earlier about L2 starts from L1 breaks and so on up the levels. I have stared at charts for sometime now and never 'seen' that (gotta "see with my mind" a little more)... Great stuff!
     
    #74     Sep 18, 2008
  5. Specterx

    Specterx

    That'd be why I wasn't certain - so the LtoR annotation marks the *completion* of an LtoR traverse and the beginning of RtoL? You're good in that case.
     
    #75     Sep 18, 2008
  6. Aurum

    Aurum

    Good stuff ehorn - as a minor suggestion regarding the OO technical aspects...

    I would approach it by encapsulating the pertinant tape/traverse/channel logic in those classes, and testing with something along the lines of

    Code:
    if (L1.contains (currentBar) == true) {...}
    if (L1.hasRTLBO (currentBar) == true) {...}
    Obviously this is a very generic comment since I don't know your codebase or practices. However, I can see quite a bit of benefit by using additional classes for the channels instead of structs in the bar class.

    HTH
    -Au

    edited to clarify further
     
    #76     Sep 18, 2008
  7. ehorn

    ehorn

    Great suggestion and I agree! and most likely it will mature into this model (though not before I bang my head trying some other ways) :D As I mentioned somewhere else, I am not that great of a programmer, and I usually start off simple (which turns out to be complex for me) and work up from there. Thanks for the ideas Au!

    P.S. (thinks on it some more)... Really great stuff! Now my mind is really racing :) Raising events for BO's intra-bar and IF1's (if needed)

    Thanks again.
     
    #77     Sep 18, 2008
  8. I'm getting bothered by ES data. I'm so unfamiliar with it. I got this historical data for free from the CME website for Feb 1, 2008.

    Why do the candles have such long wicks?

    <img src="http://www.elitetrader.com/vb/attachment.php?s=&postid=2076997" width=800 height=600>
     
    #78     Sep 19, 2008
  9. The following posts ar keyed to this outline of some stuff that appeared previously:


    This is a template for profiting from any liquid market.

    There are three hurdles:



    Acquisition of skills

    Effective use of skills

    Application of capital


    There are four stages:



    Learn to learn

    Know how the mind works

    Have a business plan

    Have a trading plan


    People learn best from helping others.


    The learning process

    Through careful study, the steps of price/volume cycling are internalized.

    The exposition is like a reading test. A reader may gain a basic level of comprehension, without achieving real understanding.

    Learn to take what the market offers and a strategy evolves.

    The science of trading is based on:



    How the market works

    How the market is observed

    How the trader operates

    How money is made


    (Fig 4)

    The trading strategy

    There are seven cases for price trending (Fig 8).

    There is a 4-part approach to trading:



    Monitoring

    Analysis

    Decision-making

    Action


    Operators are used to determine:



    trends and sentiment

    a channel on three timeframes

    price volatility.


    (Fig 9 shows the seven price cases that are examined by the operators shown in Fig 8)

    Volume is the second independent variable. (see Fig 10) This is examined with the mind module. Operators determine the:



    vector, surge or pause (demonstrated by change in speed)

    pace and change of pace


    Fig 11 shows the Price volume annotation module. Three timeframes are annotated to form layers. Level III is coarse, level II is the middle layer and Level I is fine. This is where the seven cases of Fig 8 appear. Annotations are built from Level I to II to III.

    Fig 12, The Channel Formation Module, deals with drawing the channels. This lets us apply the P, V relationship. Also of note is the overlap relationship of channels, heralded by a Failure To Traverse (FTT).

    The P, V module provides the remaining data. A defined number of data sets are monitored and analyzed in turn. This enables us to determine the market MODE (Continue or Change) as expressed by



    P, V relationship

    Internals detection

    A pace change override signal.


    On Level I, when the market is not trending, internal patterns are forming. These comprise two types of Level II channel traverse:



    Dominant - a traverse with a channel trend

    Non dominant - a traverse against the channel trend.


    (Figs 14 and 15 – the trader can anticipate moves).

    FTT is important for market timing. Fig 14 shows what happens before and after a FTT. Because the market is cyclic it is possible to anticipate based upon what must come next: inter-bar volume (Gaussian) shifts; and flaws (WWT or What Wasn’t That). Fig 15 shows the graphic regions that are assigned to these.

    Figs 16-18 deal with the details of sequences and internal data arrays. This lets the trader anticipate for the next several bars and the potential price and volume value zones. It also explains why the market moves in an orderly fashion, eliminating choices then taking the one remaining path.

    Application of capital

    There are three categories for the application of capital:



    SCT - this allows rapid profits (much greater than the daily range) spread over up to 40 trades per day.


    PVT (equity position trading) - this handles 100,000 share units of roughly 200 US stocks, cycled every 2.5 days. Each individual application is $2.5M.


    SR – this is relatively slow, at 4%/week over 4.5 weeks, but unlimited capital may be applied since a sector rotation strategy is used.


    Profits are moved from SCT to PVT and then to SR.

    I'll key the attachment to these illustration numbers. 1 through 8 not mentioned come first. and I still have to do 17 and 18.
     
    #79     Sep 19, 2008
  10. Illustration 1 the mind module

    [​IMG]
     
    #80     Sep 19, 2008
Thread Status:
Not open for further replies.