Tradestation Easylanguage

Discussion in 'Automated Trading' started by tampatrader82, Apr 4, 2008.

  1. Does anyone have a basic outlay for the following:

    If current bar hits new hi for the last X bars and closes below the close of the last bar, then buy the stock at the close of current bar (or open of next).

    I am not a huge programmer and just looking for a basic set up so I can begin to tinker around...looking at a blank easy language screen is pretty overwhelming. Thanks in advanced.

  2. Condition1 = (H = Highest(H, X));
    Condition2 = (C < C[1]);

    If (Condition1 and Condition2) = True Then
    Buy ("Buy Order") This Bar on Close;

    Hope this helps.

  3. Tums


    TS comes with 100+ strategies in the program.

    Just open one up and start from there.

    All the Buy/Sell routines are already written, there is no need to reinvent the wheel.

    If you want to try some experiments, I would be happy to chip in.
  4. Tums


  5. Here, I made this basic strategy for you.

    Input : barsback(4);
    Input : s (100), p( 100);

    setprofittarget (p);

    Condition1 = (H = Highest(H, barsback));
    Condition2 = (C < C[1]);

    If (Condition1 and Condition2) = True Then
    Buy ("Buy Order") This Bar on Close;

    It's bad but it's what you asked.

    Hope it serves you well.

  6. Thank everyone for the input. I gave an example just to get started. I bought the T-station basics to easy language and have been using it.

    My strategies are solid and do work (the one i gave you obviously wasn't one, but i needed something to start with. (Im secretive about strategies (kind of dumb I know, but oh well). I have good insight, just bad back testing ability due to lack of comp sci knowledge.

    Once I figure out darn easy language I'll be happy. I should have majored in comp sci instead of econ back in the day :).

    Thanks again, anyone interested in potentially building a strategy? I figure my input and easy language knowledge from someone else, could end up being a profitable team.