Looking for a simple figure.

Discussion in 'Strategy Development' started by Prevail, Jan 13, 2006.

  1. Prevail

    Prevail Guest

    Perhaps I've missed it but I can't seem to find the close of the last third Friday from any given bar. For example, the close of December '05. 'Anyone know how to accomplish this?
     
  2. ????.............(1) Look at a monthly chart and scroll on the December-2005 bar for the closing price. That would tell you the end of the month, Friday December 30th, price. (2) Did you want the close for the 3rd Friday of that month? If so, use a daily or weekly continuation chart and scroll on the proper bar.
     
  3. he is looking for it via program syntax...
     
  4. maxpi

    maxpi

    What language are you programming in? Probably one that frustrates you, believe me, they all do.
     
  5. Prevail

    Prevail Guest

    Sorry I wasn't more clear. I'm looking at the close of the last 3rd Friday as a filter in TS8. If the market is > the close of the last 3rd Friday I only want to take long trades but if the market is < the close of the last 3rd Friday I only want to take short trades.

    Thanks.
     
  6. Vars:MyFilter(0);

    If Next3rdFriday(1)[1] = 1 Then Begin
    MyFilter=C;
    End;


    If C>myfilter then....
    If C<myfilter then....


    I have the "Next3rdFriday" function for ts2000i. Don't know if it works on ts8.0
     
  7. Prevail

    Prevail Guest

    risktaker, thank you very much, works great. Let me know if I can do anything for you.
     
  8. Prevail

    Prevail Guest

    Here are the results of the TS code we put together on the $INX from '84-'06. This equates to about a $350k loss on the spooz:

    Vars:MyFilter(0);

    If Next3rdFriday(1)[1] = 1 Then Begin
    MyFilter=C;
    End;

    If C > myfilter then buy this bar on close;

    If C < myfilter then sellshort this bar on close;



    As can be seen, if this code was faded it would have performed much better. However, the goal is to get away from mean reversion and to possibly compliment a short options strategy. Ideas are welcome.
     
  9. Prevail

    Prevail Guest

    Graphic.