Creating an Automated System - Aussie Stock Forums

Results 1 to 4 of 4
  1. #1

    Default Creating an Automated System

    There are 2 main reasons for creating an Automated system.
    1) To test your theory.
    2) To remove the psychology from your decision making process.

    Here is some code written in Easy Language used on the Trade Station platform. This sholud give you an idea of how to create a simple system.

    Open a chart and set the time scale to 3 mins, Then click on “Insert” then “Symbol” and enter the same symbol again and set the time frame to 15 min. This second symbol will now be Data2.
    Set you inputs to suit, here we can see I have set the Profit Target to $2000 which means 200 pips on a FX chart. The Stop and Break Even Stop is set to $400.
    The code will now look for MA crossovers on a 3min chart when the 15 min chart is same. So it will only enter long trades when the fast avg on the 15 min chart is above the slow avg on the 15 min chart and visa versa.
    (The code)
    {By John Watters//Hurricane-fx//2006}
    inputs: Price( Close ), FastLength( 7 ), SlowLength( 50 ),
    ProfitTargetAmt( 2000 ), StopLossAmt(400),
    BreakevenFloorAmt( 400 );{Declaring Input Values}

    variables: FastAvg( 0 ), SlowAvg( 0 ),FastAvg15( 0, data2 ),
    SlowAvg15( 0,data2 );{Declaring the Variables}

    {Defining the Variables}
    FastAvg = xAverage(Price, FastLength);
    SlowAvg = xAverage(Price, SlowLength);
    FastAvg15 = xAverage(Price, FastLength)data2;
    SlowAvg15 = xAverage(Price, SlowLength)data2;

    {Creating the Conditions}

    Condition1= FastAvg15 > SlowAvg15;
    Condition2= FastAvg15 < SlowAvg15;
    Condition3= FastAvg crosses above SlowAvg;
    Condition4= FastAvg crosses below SlowAvg;

    If CurrentBar > 1 and
    {used to avoid spurious cross confirmation}
    Marketposition <1 and {Confirms we are not already in a Long Position}
    Condition1 and Condition3 then

    Buy ( "BUY" ) next bar at market ;

    If CurrentBar > 1 and
    {used to avoid spurious cross confirmation}
    Marketposition >-1 and {Confirms we are not already in a Short Position}
    Condition2 and Condition4 then

    Sellshort ( "SS" ) next bar at market ;


    If Marketposition <> 0 {Says If we are in a position then}
    then BEGIN
    SetProfitTarget( ProfitTargetAmt ) ;
    SetStopLoss( StopLossAmt );
    SetBreakeven( BreakevenFloorAmt );

    Mr Hurricane

  2. #2

    Default Re: Creating an Automated System


    Good to see you put the system up.

    Just as a matter of interest have you tried the system with three averages, i.e. slow, medium and fast?

    For example:

    1. SlowAvg(21) MediumAvg(35) FastAvg(85), or
    2. SlowAvg(15) MediumAvg(30) FastAvg(50).

    One of the good things with simple systems is the ability to try different approaches and analyse the behaviour.


  3. #3

    Default Re: Creating an Automated System

    Whoops, should read:

    1. FastAvg(21) MediumAvg(35) SlowAvg(85), or
    2. FastAvg(15) MediumAvg(30) SlowAvg(50).

  4. #4

    Default September 9.8%

    The Trilogy performance for September was 9.8%


    Moderator's Note: I have allowed this post to stand- it would normally be considered spam/spruiking and the poster would be banned immediately but as you have contributed in substance before on ASF I will only suggest a warning about links to external sites and the promotion of your automated trading service.

    Please read the forum code of conduct and posting guidelines asap.

    Last edited by RichKid; 6th-October-2006 at 11:32 AM. Reason: mod note

Similar Threads

  1. Mechanical System Design Project - Join hands?
    By skl99 in forum Trading Strategies/Systems
    Replies: 45
    Last Post: 23rd-February-2010, 09:07 PM
  2. OzFx System :)
    By OzFx in forum Forex
    Replies: 53
    Last Post: 5th-May-2008, 11:11 AM
  3. The KR system
    By treefrog in forum Trading Strategies/Systems
    Replies: 10
    Last Post: 11th-January-2008, 03:15 PM
  4. Techno-Fundie System
    By mit in forum Trading Strategies/Systems
    Replies: 2
    Last Post: 5th-September-2006, 11:19 PM
  5. Replies: 17
    Last Post: 1st-May-2006, 08:37 PM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Aussie Stock Forums