NexusFi: Find Your Edge


Home Menu

 





Looking for ELD help...exporting to excel


Discussion in TradeStation

Updated
    1. trending_up 2,635 views
    2. thumb_up 1 thanks given
    3. group 3 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread

Looking for ELD help...exporting to excel

  #1 (permalink)
Lingroup
Chicago Il
 
Posts: 3 since Sep 2013
Thanks Given: 1
Thanks Received: 0

Im looking for help on an eld file used to export data from TS to excel. Below is the code I'm using to export said data, for me I'm only interested in the last price.

The particular issue I'm having is the sheet number the data is being exported too. Under Inputs, the line "ExcelSheetName( "Sheet1" )", the data exports to Sheet1 of the excel file. One of the problems is, I need to export data from 5 different markets and when I insert the analysis technique into each chart, it overrides the last chart I inserted the technique into. One option is to go in and relabel the sheet #, so sheet2, sheet3, ect. The problem is, I need all the data from each chart on one sheet.

The issue is that this data is being imported into another program and the program doesn't play nice with additional sheet numbers. So I need a way to insert this into each chart, without it conflicting with other charts that have the same analysis technique and to have it save the data on their own rows on the same sheet1? Thanks




Quoting 
using elsystem ;
using elsystem.office.excel ;
using elsystem.collections ;
using tsdata.marketdata ;

inputs:
ExcelFileNameWithPath( "C:\MyFile.xlsx" ),
ExcelSheetName( "Sheet1" ),
Int UpdateInterval(2);

variables:
Workbook WB( NULL ),
Sheet Sheet1( NULL ),
Timer Timer1( NULL ),
intrabarpersist Row(0);

method void Timer1_Elapsed( elsystem.Object sender, elsystem.TimerElapsedEventArgs args )
begin
Sheet1.Cells[3, Row + 1] = Last ;
end;

once
begin

//---------------------------
//Workbook WB
//---------------------------
WB = new Workbook;
WB.FileName = ExcelFileNameWithPath;
WB.Shared = true;
WB.Visible = true;
WB.Load = true;
WB.SaveOnClose = false;
WB.Name = "Workbook1";

//---------------------------
//Sheet Sheet1
//---------------------------
Sheet1 = WB.Sheets[ ExcelSheetName ];

//---------------------------
//Timer Timer1
//---------------------------
Timer1 = new Timer;
Timer1.Interval = 2000;
Timer1.Name = "Timer1";
Timer1.elapsed += Timer1_Elapsed;
Timer1.Interval = UpdateInterval * 1000;

Row = GetAppInfo( aiRow );
Sheet1.Cells[1, Row + 1] = Symbol ;

Timer1.Start();


end;

Plot1( Last, "Last" );
Value99 = Close;


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
REcommedations for programming help
Sierra Chart
How to apply profiles
Traders Hideout
Cheap historycal L1 data for stocks
Stocks and ETFs
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
What is Markets Chat (markets.chat) real-time trading ro …
72 thanks
Spoo-nalysis ES e-mini futures S&P 500
55 thanks
Just another trading journal: PA, Wyckoff & Trends
27 thanks
Bigger Wins or Fewer Losses?
24 thanks
The Program
16 thanks
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,628

Lingroup,

you have the code write to the same cell for every chart when you apply it to charts (for Radarscreen aiRow would take care of using a different cell).
Therefore you could create an input for the cell number and have each chart write to a different cell (take a look at how it's done in your code with using aiRow; you can even add some more code to check if the study is running on a chart or in Radarscreen and use the row input only when the study is applied to a chart).

Regards,

ABCTG

Follow me on Twitter Reply With Quote
  #3 (permalink)
Lingroup
Chicago Il
 
Posts: 3 since Sep 2013
Thanks Given: 1
Thanks Received: 0



ABCTG View Post
Lingroup,

you have the code write to the same cell for every chart when you apply it to charts (for Radarscreen aiRow would take care of using a different cell).
Therefore you could create an input for the cell number and have each chart write to a different cell (take a look at how it's done in your code with using aiRow; you can even add some more code to check if the study is running on a chart or in Radarscreen and use the row input only when the study is applied to a chart).

Regards,

ABCTG



Any chance you could provide more detail? I didn't write the code, it was provided by someone else. I don't have any coding experience but I do understand about writing to the same cell. I just don't know how to go about changing that to write to different cells. Also I don't have radarscreen, I'm not subscribed to it, Im limited to just using the technique in the charts.

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

Lingroup,

I would suggest to take a look at the help file or the EasyLanguage Essentials PDF on how to create numeric inputs.
Then use the input where the code you posted sets the value of the Row variable.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
Thanked by:




Last Updated on June 19, 2017


© 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