Tradestation: a Basic Crossover Strategy

Discussion in 'Automated Trading' started by Nashequilibrium, Oct 3, 2006.

  1. Hey Anna, welcome.....

    Well the problem i had was very simple but everyone interpreted it differently making it much more difficult. I didnt solve the problem as the strategy still buys on the open of the next bar instead of the current bar.

    So what i did, since i was running it on a high frequency data, i hired a friend of mine from accenture to program it in excel, using a dde link for the data feed and then routing the trades to the broker, its done i am running it in test mode with little cash.....i am to nervous to include it in my portfolio yet but so far so good.

    As far as tradestation goes i am using the crossover strategy there as well but i have decreased the time frame to daily and that is going fine so far as well!!
     
    #31     Nov 2, 2006
  2. i just have to disable it when volatility reaches a certain level and go manually, as i get a lot of whipsaws. Thats the next step, programming an algorithm that can mimick my thoughts during data releases.
     
    #32     Nov 2, 2006
  3. ronblack

    ronblack

    I remember I encountered a similar problem in the past. If I recall correctly the problem was due to the evaluation of conditions after the Open occurs and thus you cannot go back in time and place an order.

    If this is still the case with Tradestation I would be very surprised indeed. I thought they fixed this limitation. I've been developing my own code to test systems for some time now and I'm not up to date with Easylanguage improvements. However there are some things you can do to get around this:

    1. Just buy at the close of the bar and avoid any gaps to the next open

    or even better

    2. if you maths isn't too complicated you can just go ahead and figure out the price level the crossover will occur and buy at next bar on stop.

    Ron
     
    #33     Nov 2, 2006
  4. Sorry, I really dont want to read this whole thread, but I'll tell you how I think the problem can be solved in a few different ways.

    1) If you can handle math, then calculate what future price causes a crossover. So a starting point would be, where does your indicator(s)/prices equal eachother, and that would be the threshold of the crossover. If you would like to tell me what indicator, I could help you work this out.

    After you figure out the future price, just put a stop order to buy at the next bar at that price.

    2) I think you can use intrabarpersist with another qualifier such as marketposition=0. Therefore, only enter a trade when no position is on.

    3) If this works with the style of your strategy, in the format strategies, make sure only one order per entry is enabled. (sorry, not sure of the exact wording, I'm not near my TS computer.
     
    #34     Nov 2, 2006