EasyLanguage Question

Discussion in 'Trading Software' started by tdefarlo, Apr 26, 2002.

  1. If (C[0]-L[0]) / (H[0] - L[0]) > .8 then begin
    {Insert your code on this line}
    end;
     
    #41     May 24, 2002
  2. Bob-

    I have it in a handout.

    I could fax it to you..

    send me a private message with a fax number.


    -momo
     
    #42     May 24, 2002
  3. tried writing some EL code and failed miserably.

    Placed my Goal Low on purpose. . .guess it wasn't low enough.

    For my first assignment I just wanted to do something this simple:


    buy-or-short @ mkt. once closing price of whatever bar moves +/- 20 cents from opening price.

    then. .

    Sell-or-Buy to cover once 20 cent move from my entry point is realized.

    I can't seem to write it where EL will recognize the data point within a given bar.


    Am I banging my head against the wall??


    anyone want to shove me in the right direction?



    thx,




    momo
     
    #43     May 24, 2002
  4. {123 Bounce Strategy - Long / Short Entry - w/ included exits}

    Input: Exitbars(10), stopdollarvalue(750), Profitdollarvalue(250);

    {Entry Conditions}

    Condition1= Low < L[1] and

    low[1] < low[2] and
    high <= high[1] and
    high[1] <= high[2];

    condition2 = high > h[1] and
    high[1] > high[2] and
    low >= low[1] and
    low[1] >= low[2];

    {optional:}

    condition3 = rsi (c,14) < 30;
    condition4= rsi (c,14) > 70;

    {avoid heavy trading periods at the start and end of session}

    if time > 945 and time < 1545 then begin

    if marketposition = 0 then begin

    if condition1 then buy("Bounce Up") next bar at low limit;

    if condition2 then sell short("Bounce Down") next bar at high limit;

    end;

    end;

    if marketposition <> 0 then begin

    setstop loss(stopdollarvalue);
    setprofittarget(profitdollar value);

    {exit before the end of the day}

    if time > 1555 then begin
    buy to cover("EOSL") next bar at open;
    sell("EOSS") next bar at open;

    end;

    If barssinceentry > exitbars then begin
    buy to cover("BSEL") next bar at open
    sell("BSES") next bar at open;

    end;

    end;


    hope this helps.

    I typed it manually so check it over . . .

    Have a great Memorial Day weekend.



    -momo
     
    #44     May 24, 2002
  5. Kymar

    Kymar

    Since I know you don't mind, um, correction, just let me say: Don't forget the risk of divide by zero error (could happen if H = L, as it sometimes does).

    Might want to try:

    If H - L <> 0 then begin
    If (C[0]-L[0]) / (H[0] - L[0]) > .8 then begin
    {Insert your code on this line}
    end;
    end;


    (H, L, C, etc. are good enough when referring to current bar, don't need the [0], though I guess it might appeal to some for various reasons.)
     
    #45     May 24, 2002
  6. Kymar

    Kymar

    You have to remember that EL reiterates at the close of each bar: Only then does it set up reactions that will take place during subsequent bars. It doesn't "know" at the end of whatever current bar what the open of the next bar is going to be. Think of it as creating trigger points that can be acted upon in the future.

    There are a couple of exceptions: The built-in stop functions can act upon the same bar in which an entry is triggered, but they can also behave somewhat unexpectedly in realtime trading. They can also give very misleading backtesting results - make you think you've created the perfect moneymaking machine when all you've done is set the profit stop within the tick resolution.

    Otherwise, and for all practical purposes at least in my experience, it's better to stick to the basic EL rationale. You could write a buy stop, for instance, calculated on the close (or high, or open, or whatever fraction, etc.) of THIS bar - say buy at C + .20 stop - and you could use the built-in stops or write "first bar stops" to close at C or C + .4, though, for various reasons, you might still find the results impractical. Play with it a bit, and you may get some ideas for writing something you can use.
     
    #46     May 24, 2002
  7. Thanks for the reminder. I forgot about the divide by zero problem. TS is pretty unforgiving (at least the version I use) with the divide by zero error so best to follow Kymar's prototype.
     
    #47     May 24, 2002
  8. tpat444

    tpat444

    After reading this thread, I am not sure if TradeStation is worth the effort learning or not! I have been looking at becoming a TS Securities client due to lower commissions and what looks like a solid product. These posts look like I should spend my time with my C++ manual instead?!!

    Can anyone (everyone) who uses the product weigh in with a thumbs up or down on a) TS Securities (reliable platform, cusotmer service, etc.) and b) if TS6 is worthwhile working with (a.k.a. have you made $$ with it).

    Thanks
    -t

    p.s. If you work for TS, could you let me know when option trading will appear on the TS application. Thx
     
    #48     May 24, 2002
  9. PXG

    PXG

    Kymar,
    I am not sure if I understood your post correctly, but actually, TS "knows" at the close of current bar what the open of next bar is going to be.

    Try:

    Buy Next Bar at Open of Next Bar + 0.2 Stop;
    SellShort Next Bar at Open of Next Bar - 0.2 Stop;

    You can use "Next Bar" only with "Open", "Date", and "Time".
     
    #49     May 24, 2002
  10. The easylanguage code is not nearly as hard as it looks. It might take a week or two to learn the basics, but in my case at least, I really enjoyed learning EL -- it wasn't at all a chore.

    As far as profitability goes, I can't say for sure because I haven't yet started trading any of the systems I have developed. I have a few good ones for the NQ mini, but I am reluctant to start trading them yet. My best system for example has a very good annualized return, even after slippage and commisions, but a max drawdown of 5K. With my luck the drawdown will happen the week I start using it. So with that in mind I am going to keep at system developement for a few more weeks until, hopefully, I get some better equity curves.

    As far as TS for a broker, I don't know. I just lease their software. I can say this, I wouldn't pay their round turn for the minis even if they did offer automation for the futures.
     
    #50     May 24, 2002