YM in a Can

Discussion in 'Journals' started by ElectricSavant, May 3, 2004.

  1. Kewl, sounds like the kinda stuff I like to read.

    Michael B.

    P.S. Thanks Ebo :)

    P.S.S. I was playing back in the days of the books "Playing Blackjack as a Business by Lawrence Revere and The Worlds Greatest BlackJack Book" by Lance Humble, Ph.D. and Carl Cooper, Ph.D. (lol those 2 authors were at each others throat, I believe Lawrence is dead, have not seen or heard from him in years). But, sigh, those day's are over.

     
    #111     May 9, 2004
  2. sammy12

    sammy12

    ES great thread..

    I want to Back test this method, but I am very new to Tradestation.

    I have written a code in Easy Language, since I am newbie to TS i need lot of help.

    My setup is the following...

    In Data2 ( subgraph), I have Daily data of YM and in Data1, I have 1 minute data of YM.

    Could some body check my code, for this method because my trades are not coming out right. If some body modifies and post the correct code, I can back test.

    Thx

    {******************************8
    This is the Code for YM in a can Journal in ET by Electric servant
    http://www.elitetrader.com/vb/showthread.php?s=&threadid=32206&perpage=6&pagenumber=1
    *****************************}
    Inputs: Price(close);
    Vars: H4(0), H3(0), H2(0), H1(0), L4(0), L3(0),L2(0), L1(0), MP(0);



    MP = MarketPosition;


    If Date <> Date[1] then begin


    H4 = ((High[1] of Data2 - Low[1] of Data2)*(1.1/2)) + Close[1] of Data2;
    H3 = ((High[1] of Data2 - Low[1] of Data2)*(1.1/4)) + Close[1] of Data2;
    H2 = ((High[1] of Data2 - Low[1] of Data2)*(1.1/6)) + Close[1] of Data2;
    H1 = ((High[1] of Data2 - Low[1] of Data2)*(1.1/12)) + Close[1] of Data2;


    L1 = Close[1] of Data2 - ((High[1] of Data2 - Low[1] of Data2)*(1.1/12)) ;
    L2 = Close[1] of Data2 - ((High[1] of Data2 - Low[1] of Data2)*(1.1/6)) ;
    L3 = Close[1] of Data2 - ((High[1] of Data2 - Low[1] of Data2)*(1.1/4)) ;
    L4 = Close[1] of Data2 - ((High[1] of Data2 - Low[1] of Data2)*(1.1/2)) ;

    { H4 Breakout }
    If close of Data1 crosses above H4 and MP < 1 then begin
    Buy 1 contract next bar at H4 limit;

    If Close of Data1 crosses below H3 and MP > 0 then begin
    Sell 1 contract next bar at the H3 Limit;
    End;

    If Close of Data1 crosses below L4 and MP > 0 then begin
    Sell 1 contract next bar at the L4 limit;
    End;
    End;

    {H3 Short }

    If Close of Data1 crosses below H3 and MP > -1 then begin
    Sell short 2 contract next bar at the H3 Limit;

    If close of Data1 crosses above H4 and MP < 0 then begin
    Buy cover 2 contract next bar at H4 limit;
    End;

    If Close of Data1 crosses below L3 and MP < 0 then begin
    Buy Cover 2 contract next bar at the L3 Limit;
    End;
    End;

    { L3 Long }
    If Close of Data1 crosses above L3 and MP < 1 then begin
    Buy 2 contract next bar at the L3 Limit;

    If Close of Data1 crosses below L4 and MP > 0 then begin
    Sell 2 contract next bar at the L4 limit;
    End;


    If Close of Data1 crosses above H3 and MP > 0 then begin
    Sell 2 contract next bar at the H3 Limit;
    End;
    End;

    { L4 Breakout to the Short side }
    If Close of Data1 crosses below L4 and MP > -1 then begin
    Sell Short 1 contract next bar at the L4 limit;

    If Close of Data1 crosses above L3 and MP < 0 then begin
    Buy 1 contract next bar at the L3 Limit;
    End;

    If close of Data1 crosses below H4 and MP < 0 then begin
    Buy 1 contract next bar at H4 limit;
    End;
    End;



    End;
     
    #112     May 9, 2004
  3. I know you folks are not subscribing to this thread to hear Electric's Forecasts. Also we are net short and my following comment may put a kibosh on our position, but here goes:

    There is a 70% probability that the YM WILL GO UP and take out the short we are carrying which will still be a profit for us, plus get us in the correct direction. (this is for another journal, about market direction forecasting. There are 3 choices up, down, even)

    Michael B.

    P.S. I got an interesting piece of research in a PM about gaps and I did not see it's hidden meaning at first. I discounted it because it was dated. I must re-read and will tell you what I know.
     
    #113     May 9, 2004
  4. Ebo

    Ebo

    Can you bring me another Corona and some more Guacamole please?
    I could not resist!


    Sammy:
    TradeStation will write EL code for a small fee if you do not get a volunteer.

    :)
     
    #114     May 9, 2004
  5. Yeah, www.stategyrunner.com wants $250.00 for writing a stategy for autotrading in C++. Then they said I could offer it to the public. Shite....NOOO way. This sytem is just for ET and you Ebo. Lime for the Corona?

    Michael B.

    P.S. The nice thing about strategyrunner is that the system trades as long as there is money. It is not local or dependant on my computers connection.


     
    #115     May 9, 2004
  6. ES...

    1) Good stuff, keep it up for at least a month or so.

    2) Your marketcracy stuff sucks, drop it. (your wifey told me so)

    3) There's lotsa good system coders around who cant trade if their life depended on it and are always looking for the next hot idea. There's not so many on ET. So go on over to WealthLab forum and ask there. I bet you'll have 10 takers.
     
    #116     May 9, 2004
  7. LOL...ROFL...

    Hey Mr Market rules that arena...

    Michael B.

    P.S. One must be able to go l...long and and sh..sh...short...If you don't believe me ask Wifey. (Wapner at three, and I buy my boxer shorts at kmart in cincinnati...yeah kmart in cincinnati...yeah)

     
    #117     May 9, 2004
  8. Don't get me started...
     
    #118     May 9, 2004
  9. Ebo

    Ebo

    I prefer lemon!
    I remember paying a lot less to fix one of my EL problems.
    It needed recoding. I paid under $100.
    Checkout http://www.tradestationworld.com/index_community.asp
    You will need to register for FREE to access the board.
    There is a dated piece on CAM.

    ebo
     
    #119     May 9, 2004
  10. Where does Cam find all the time to sue these people. The tweaked version is on my desk as we speak, just waiting for the backtester. I want to see some results and get some more feedback before making quick and costly changes. Step by Step.

    We are looking for the smallest drawdown.....don't worry about profit too much. As long as there is low drawdown there is nothing Money Management cannot fix.

    Again, I want to thank you folks for your time. This has been quite an educational experience for me. NOW, LETS ARRIVE AND MAKE SOME MONEY! Just a few more months to go of forward testing...babbbby

    Michael B.

     
    #120     May 9, 2004