Considering Tradestation - but first a question...

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

  1. Collagen

    Collagen

    You can use "open next bar" syntax which mean the code will run only on the first tick of each daily bar. That would be pretty easy to make a quick version for testing. Using multi data streams has some issues especially with missing bars on the first data stream. However If You need great details then You can use a psp and then from there acquire your data that You need and feed your 1 min. data stream. Another thing to be aware is that automation doesn't work that well especially on the daily bars. There are solutions however that let You to trade safely and in a reliable fashion.
     
    #11     Jun 9, 2022
  2. lindq

    lindq

    I'm surprised that the issue of trading a daily open in EL is so difficult. I would think that many traders in the EL environment would be wanting to back test gaps from previous daily bar closes. Basically that is all I am looking to do. Put a condition on the open...or even near the open...and enter if true. (And I'm not looking for a trading solution, just back-testing.)

    Looking at your suggestion, I wonder if it would be possible put a condition on "open next bar", for example a price level indicating a gap from the previous close as a condition for entry.
     
    #12     Jun 9, 2022
  3. Collagen

    Collagen

    Yes You can definitively back-test gaps from previous daily bar closes, using open next bar. One thing to keep in mind if You are going to use Futures is that for some calculations like % You would need to use custom futures contracts in order to keep your back-test analysis valid. And Yes You can use level for entries via stp or lmt orders. If You want to reach me out and You have clear rules I may be able to make a quick script in EL for You.
     
    #13     Jun 9, 2022
    lindq likes this.
  4. SunTrader

    SunTrader

    Using daily bars also has drawbacks in testing. Assumptions are made about where entries/exits happen.

    Assumptions are not good when it comes to deciding to put into live real-money trading what history shows worked.
     
    #14     Jun 9, 2022
  5. Bad_Badness

    Bad_Badness

    I think the whole can of worms is based on the fact "bars" are the defining universe in these scripts.

    There is a check called BarStatus that allows one to execute at various points.

    BarStatus = 0 then ...

    Here is the information...

    BarStatus
    Returns a numerical value, indicating the status of the most recent tick in the current bar of the specified data series.
    A value of 0 indicates that the tick is the opening tick of the bar, 1 indicates that the tick is within the bar, and 2 indicates that the tick is the closing tick of the bar.

    Usage
    BarStatus(DataNum)
    Where: DataNum - a numerical expression specifying the data number of the series
    If DataNum is not specified, a value for the current data series will be returned.

    Example
    BarStatus(1) will return a value of 2 if the current tick in the data series with the data number 1 is the closing tick of a bar

    PS: when you do multiple Data streams, the UI can get wacky, so one should probably make the second data stream as "hidden".
     
    #15     Jun 9, 2022
    lindq likes this.
  6. SunTrader

    SunTrader

    I have many multi-data stream chart windows with zero issues.
     
    #16     Jun 9, 2022
    Bad_Badness likes this.