Trading the open

Discussion in 'Trading' started by trade_addict, Oct 2, 2003.

  1. Why not test it yourself with your favorite trading stocks?
    If you do,let us know how it works out.

    sulong
     
    #21     Oct 3, 2003
  2. Lovelitera

    Lovelitera Guest

    Mark Fisher in his book The Logical Trader describes a trading method that starts with the opening range setup and uses the opening range as reference for some pivots.

    It is definitely worth reading.
     
    #22     Oct 4, 2003
  3. By "open", do you mean an index or an induvidual stock, index, or future?
     
    #23     Oct 4, 2003
  4. saico

    saico

    I think it's a good idea to try Breakouts method with Ensigns Playback feature. So you can trade different opens as much as you'd like without any risk.

    Saico
    Germany
     
    #24     Oct 4, 2003
  5. I published a system based on some work I did. You can get the description and the FREE code here:
    http://www.wealth-lab.com/cgi-bin/WealthLab.DLL/editsystem?id=8553
    Unfortunalty you can not test it on the web site since it is based on ID data (obviously). With the desktop version you can test it on a portfolio of symbols at once with real portfolio level money management. I traded it a few years ago in Germany quite successful with a few changes. :)

    Volker
     
    #25     Oct 4, 2003
  6. I thought since not everybody like to follow the link I post teh description and the code here:

    ChartScript Description
    THIS SYSTEM IS MADE FOR INTRA DAY DATA AND THEREFOR CAN ONLY BE USED WITH THE DESKTOP VERSION!!!

    This system is a half hour breakout system. It buys, if the closing price of any bar intervall is above the highest high or below the lowest low of the first half hour time span. You can experiment with various filters. I have traded it very successfully on the DAX futures some time ago with some more filters. I have written a few lines of description what the following code is doing inbetween the code.

    It also has a few nice excamples of how to code:

    1. Take only one position per day
    2. Trade only stocks that closing price is above 5


    Have fun.

    vk

    WealthScript Code
    Below is the WealthScript code for this ChartScript.

    ( Click here for a version of the WealthScript code suitable for copying to the clipboard)

    var OD, HIGH30, LOW30: float;
    var N, NUM, BAR, COUNTER: integer;



    {this is a function that is available on the desktop}


    n := BarInterval;

    if n = 0 then
    begin
    ShowMessage( 'Works on intraday data only!' );
    Abort;
    end;

    function MarketPosition: integer;
    begin
    if not LastPositionActive then
    Result := 0
    else if PositionLong( LastPosition ) then
    Result := 1
    else
    Result := -1;
    end;

    {setting the time interval (here 30 minutes) that i want to use}

    num := ( 30 / n ) - 1;


    for Bar := 20 to BarCount - 1 do
    begin

    {color the first 30 minutes in green}

    if BarNum( Bar ) <= num then
    SetBarColor( Bar, #Green );

    {the breginning of the day}

    if BarNum( Bar ) = 0 then
    begin

    {get the open of the day}

    OD := PriceOpen ( Bar );

    {set a variable called "counter" to zero on every beginning of the day}

    Counter := 0;
    end;

    if BarNum( Bar ) = num then
    begin

    {get the highest high and the lowest low after 30 minutes}

    High30 := Highest( Bar, #High, num + 1 );
    Low30 := Lowest( Bar, #Low, num + 1 );
    end;
    if LastBar( Bar ) then

    {exit on the last bar of the day}

    SellAtClose( Bar, LastPosition, 'Last Bar' )
    else if BarNum( Bar ) > num then
    begin

    {check wether the closing price of the previous day was greater then 5
    ( we dont want to trade penny stocks ). If it is smaller then five the
    script will coninue the upper loop until the closing price is above 5.}

    if PriceClose( Bar ) < 5 then
    Continue;

    {only if the Close is above five the next line will be executed}

    if PriceClose( Bar ) > High30 then
    begin
    {if the closing price is greater then the first 30 minute high the bars will
    be colored blue}

    SetBarColor( Bar, #Blue );

    {checking that we are not long already}

    if MarketPosition <> 1 then
    begin

    {if we are short then we want to cover}

    CoverAtMarket( Bar + 1, LastPosition, '' );

    {checking that we had no position on that day already, because we only want
    to take one position per day}

    if Counter = 0 then
    begin
    BuyAtMarket( Bar + 1, '' );

    {since we are getting into a position for the first time we put the counter
    to one}

    Counter := 1;
    end;
    end;
    end

    {see wether the close is below the first 30 minute low}

    else if PriceClose( Bar ) < Low30 then
    begin

    {if it is the bars are now cloured red}

    SetBarColor( Bar, #Red );

    {make sure we arent already short}

    if MarketPosition <> -1 then
    begin

    {if we are long we exit the position}

    SellAtMarket( Bar + 1, LastPosition, '' );

    {make also sure we did not have any position during the day, because we only
    want to take one position per day}

    if Counter = 0 then
    begin

    {now we can go short}

    ShortAtMarket( Bar + 1, '' );

    {and set the counter to one}

    Counter := 1;
    end;
    end;
    end;
    end;
    end;


    If you follow the link on the earlier post the coding part and the explanation part is differentiated by color and there for the code is better readable.

    Volker
     
    #26     Oct 4, 2003
  7. You said it buys first bar making a higher high or lower low after first 30 minutes. Shouldn't there be a sell signal for the lower low? where is the stop?
    regards
     
    #27     Oct 4, 2003
  8. Well. the goes long or short and exits on the opposite signal or at the end of the day. The system only takes one position per day. Another filter I was using is that it needs the close of the bar to be above the HH or LL but it could also be programmed that it takes the pure HH or LL for entries and exits. It just has not proven that successful for me.

    Volker
     
    #28     Oct 4, 2003
  9. I,m still confused. Did you mean to say go short or lower low.?
     
    #29     Oct 4, 2003
  10. The system goes either short or long. Once a position is taken it does not take the opposite direction. May be you follow the link to the code, because then it is easier for yout to read the code and the description.

    http://www.wealth-lab.com/cgi-bin/WealthLab.DLL/editsystem?id=8553

    Remember you can not test this system on the web site since it is based on intra day data. There are a few other open range break out systems that are based on EOD data that you can test on the site, just do a search.

    Volker
     
    #30     Oct 4, 2003