Considering Tradestation - but first a question...

Discussion in 'Strategy Building' started by lindq, Jun 8, 2022.

  1. lindq

    lindq

    Are you experienced with Easy Language? Great. I have a question for you before I engage with Tradestation.

    I want to be able to code a system that I currently trade, and have developed with another platform. It's a very simple system, but in my reading and watching of Easy Language tutorials I'm not sure if it can be coded in EL. And if it can't, then I'm not going get on that long path. The potential problem involves entering at the open of a bar. In this case, it is a daily bar.

    To be precise, IF the close of yesterday's bar meets certain conditions, for example above or below an MA, and IF the bar open today is above or below the close of yesterday by X percent, then enter the trade.

    Sounds simple. And it is. But I'm not sure that EL can handle it from what I've read. Understand I'm not looking for code, but just a confirmation of my suspicions regarding problems with entering on a bar open.

    Gracias.
     
  2. SunTrader

    SunTrader

    It can be done but with two data streams - daily and one minute for instance.

    Since you are referencing current day's daily bar vs previous day (MA as you mention or whatever) you will need lower timeframe to place order as daily bar has already opened it can't place trade based on using opening price. Also orders are executed on close of particular bar.

    Code would have to be written that if Open is X% +/- Close[1] then {do this ....}.
     
    Last edited: Jun 8, 2022
    lindq likes this.
  3. lindq

    lindq

    Thanks. That's what I thought might be the case in EL. Previous day would likely be daily bars for a setup, then minute bars the next day at the open. Which again begs the question if the actual daily open can be nailed at all in EL if backtesting needs to wait until the first minute bar of the day completes.

    Also, I recall reading in the EL manual that more than one data stream can't be referenced at the same time. Not sure if this was meaning multiple periodicities (daily and 1 min), or multiple instruments.

    Any thoughts?
     
  4. I don't think that is a problem. Most of the issues I experienced is the way the back testing and forward testing interpret and evaluate criteria for a bar at OPEN, CLOSE, HIGH, LOW.

    Also consider that "opening bar" is a concept that is sort of fixed with a daily bar. Whereas any smaller time frame in minutes has bars before the Market Open time.

    On the other hand, the easy language has very primitive scoping. Basically everything is in one name space. E.g. two custom functions cannot share the same variable name because they are not "private" and always public.

    If Criteria[1] and Criteria[0] then buy MKT.

    PS: Saw your second post. Yes you can run multiple data streams. However, things get pretty inefficient quickly if not careful.
     
  5. SunTrader

    SunTrader

    Close of Data2[1] > MA and OpenD of Data2 +/-% Close of Data2[1] then {entry on lower timeframe - 1 minute referenced as Close of Data1, which is the only one strategies are executed on}.
     
  6. You should be able to do it in Tradestation. However - I stopped using Tradestation many years ago - when the Cruz brothers owned it. If you contact me - I will tell you why - don't want to do it in the forum.

    I currently use MultiCharts PowerLanguage - very similar to TS EasyLanguage. The beauty of MultiCharts is - they also have a .NET C# version.

    If you have time - I can explain in Skype - or open a Zoom Room - although I prefer Skype - will show you what happens. It may or may not be what you want to do. Send a Private Message - if you want to talk.

    I have an ET Thread - "Scalping_My Way with ACV".
     
  7. lindq

    lindq

    "Bars before the market open". Yes, I think you may have nailed it.
     
  8. SunTrader

    SunTrader

    If you are basing signal on today's daily bar open (which is actually last night's globex open) then yes entry can be made on next one minute bar last night - way before RTH open.

    Otherwise how can "bars before the market open" be applied?
     
  9. lindq

    lindq

    Recall that I want today's daily bar to end with certain conditions as a set up to entering at tomorrow's open. With EL there does not appear to be a way, staying with daily bars, to nail the open in backtesting. But...if I use a smaller time frame as a 2nd data stream, like 5 min bars, then at premarket the next morning I can define the price level I want and enter at the close of the bar just before 930. At least this is my theory of how EL might let me backest my strategy of entering a trade at market open. I am also assuming I will be able to access premarket for equities,
     
  10. lindq

    lindq

    Thanks for your offer of help. But I believe I found a solution to my problem.
     
    #10     Jun 9, 2022