NexusFi: Find Your Edge


Home Menu

 





data export


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one Mondrakete with 3 posts (0 thanks)
    2. looks_two shadrock55 with 3 posts (2 thanks)
    3. looks_3 padario with 1 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 12,813 views
    2. thumb_up 6 thanks given
    3. group 6 followers
    1. forum 10 posts
    2. attach_file 0 attachments




 
Search this Thread

data export

  #1 (permalink)
Mondrakete
Germany
 
Posts: 24 since Feb 2011
Thanks Given: 1
Thanks Received: 0

Does anybody know how to export OHLC, volume and open interest data of a continous contract from
tradestation to a txt or csv-file?

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
How to apply profiles
Traders Hideout
ZombieSqueeze
Platforms and Indicators
MC PL editor upgrade
MultiCharts
Trade idea based off three indicators.
Traders Hideout
 
  #3 (permalink)
shadrock55
Marietta, GA U.S.A
 
Posts: 9 since Mar 2011
Thanks Given: 0
Thanks Received: 4


1. Place the time frame that you want on the chart for as far back as you want. (1 min, 5 min, etc)
2. I'm not by my PC right now so I wasn't able to verify/compile this, but an example of the code you need to put into your strategy looks like this:

Print (File("C:\output.txt"), Open, ", ", High, ", ", Low, ", ", Close, ", ", Volume);


3. Depending on how far you go back, using those continuous contracts built into Tradstation (@ES for example) becomes more and more of a risk. for instance, if you compare @ES with unmodified data, it will be more than 100 points off if you go back to 2005. If you want true price action, you need to create a custom contract.

Reply With Quote
Thanked by:
  #4 (permalink)
Mondrakete
Germany
 
Posts: 24 since Feb 2011
Thanks Given: 1
Thanks Received: 0

Thank you for the info.

Concerning continuous contracts-I'm just thinking about the problem of historical offset
and in which cases there will result a problem because of that.
How is the logic that is used by Tradestation to construct continuous contracts
and what would be an aproppriate customized cont. contract to avoid problems due to backadjustment?
One the one hand I look for realistic historical prices of commodities
and on the other hand I want to do realistic backtests with the data.
Is it possible to export single historical contracts ?

I'm quite new to backtesting with futures and I'm looking forward to learn as much :-)

Reply With Quote
  #5 (permalink)
shadrock55
Marietta, GA U.S.A
 
Posts: 9 since Mar 2011
Thanks Given: 0
Thanks Received: 4

I'm a little confused, but I here's what I think you want to know.

I've actually purchased data without adjustment since I wanted large amounts of tick data, and I always use that in my backtesting. On the off event I use TradeStation, here's what I do.

Under custom futures, I select.
1. Type in the root
2. Time: 8 days prior to expiration
3. Back Adjustment Method: None

If you are trading over night, you will need to monitor these days or take them out of your trading model because it will create a gap. I do not, so it is not an issue for me.

I alway test on unadjusted because I want to know the true percentage and point size of all the moves. It throws off indicators, moving averages, and even the size of the pure price action. I just feel like I need to test on what actually happened (especially if I optimize).

I'm sure there's a varying opinion, but it just gives me comfort.

Reply With Quote
  #6 (permalink)
Mondrakete
Germany
 
Posts: 24 since Feb 2011
Thanks Given: 1
Thanks Received: 0


shadrock55 View Post
I'm a little confused, but I here's what I think you want to know.

I've actually purchased data without adjustment since I wanted large amounts of tick data, and I always use that in my backtesting. On the off event I use TradeStation, here's what I do.

Under custom futures, I select.
1. Type in the root
2. Time: 8 days prior to expiration
3. Back Adjustment Method: None

If you are trading over night, you will need to monitor these days or take them out of your trading model because it will create a gap. I do not, so it is not an issue for me.

I alway test on unadjusted because I want to know the true percentage and point size of all the moves. It throws off indicators, moving averages, and even the size of the pure price action. I just feel like I need to test on what actually happened (especially if I optimize).

I'm sure there's a varying opinion, but it just gives me comfort.

I focus on overnight strategies with holding periods arround some days, weeks or even months.
Later on I might trade based on CFD's or certifiactes since I don't have to worry about rollover by using that instruments. Since there is no data history available for those instruments I have to test based on historical future prices.
It seems like I have to include rollover into my backtesting by using to different nonadjusted continuous contracts with two different switching periods prior to expiration.

Whats the method of Tradestation for backadjustment and switching contracts to construct the readiliy available endless contracts?

Reply With Quote
  #7 (permalink)
shadrock55
Marietta, GA U.S.A
 
Posts: 9 since Mar 2011
Thanks Given: 0
Thanks Received: 4

I'm not sure of the exact methodology. Here's what they had in the help.

"Once a rollover point is reached, the data must be adjusted. The TradeStation network does this by either adding or subtracting a constant to all data that exists before the rollover point, all the way back to the beginning of the data series."

Continuous Futures Contracts

Rollover is only 4 days a year for most symbols, so when I used to hold over night, I just set it to sell out before rollover and start back afterwards. If you're holding for months, however, that won't help you. I'm sure there are others who have encountered the problem who may be able to help.

I don't know what a CFD is, but I would not take a tested strategy from one future and apply it to another unless you are sure they trade in tandem and with about the same volatility.

Reply With Quote
  #8 (permalink)
 T1P1 
USA
 
Posts: 6 since Feb 2011


Mondrakete View Post
Does anybody know how to export OHLC, volume and open interest data of a continous contract from
tradestation to a txt or csv-file?

Load any chart from any time frame with any amount of data and with any indicators.

Select View from menu bar and then select data window. From data window save values to csv file and you have it all as easy as pie.

cheers

Reply With Quote
  #9 (permalink)
Germany1960
germany
 
Posts: 4 since Nov 2019
Thanks Given: 1
Thanks Received: 2

Can anyone explain to me how I can extract the values of an indicator from the TradeStation to use them on Excel?

Reply With Quote
  #10 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629


Germany1960,

the best approach depends on your exact requirements. In case historical values are fine exporting the data via the data window is quick and easy:
Saving (Exporting) the Data Window as a ASCII Data File

Besides that you could have your indicator write to a file or have it write to Excel directly, but these two approaches require coding.

Regards,

ABCTG


Germany1960 View Post
Can anyone explain to me how I can extract the values of an indicator from the TradeStation to use them on Excel?


Follow me on Twitter Reply With Quote
Thanked by:




Last Updated on May 21, 2020


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts