Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 05-21-2010, 12:37 PM   #1

Join Date: May 2010
Posts: 2
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

Getting a Fixed Value Rom an Excel Sheet in Tradestation Strategy

I have a strategy that needs to get a risk value from my excel sheet- I tried to used ELXL addon but could not get the program to work correctly. What are fast methods to get data from .csv or .xls file?
vt2009 is offline  
Reply With Quote
Old 05-21-2010, 12:46 PM   #2

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,474 Times in 912 Posts

Re: Getting a Fixed Value Rom an Excel Sheet in Tradestation Strategy

you have to give more info
__________________



Only an idiot would reply to a stupid post
Tams is offline  
Reply With Quote
Old 05-21-2010, 05:20 PM   #3

Join Date: May 2010
Posts: 2
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

Re: Getting a Fixed Value Rom an Excel Sheet in Tradestation Strategy

I have an automated tradestation strategy that needs to get data for each symbol from a spreadsheet I made. I have had problems using ElXL function that is built by tradestation. I keep getting the error: Workshheet name should not contain extended path information.

The problem is that I dont have the extended path information in the code to begin with so I dont understand this error.


Here is my simple excel code based on the demo:



inputs:
string WorkbookName("FuturesBigL ist.xls"),
string WorksheetName("FeatureLis t");
var:bool WorksheetReady(false);
var:bool XLStarted(false);

XLStarted=ELXL_Initialize ;
If XLStarted then
begin
WorksheetReady=ELXL_WithS heet(WorkbookName,WorkShe etName);

vars: string Instrument(GetSymbolName) ;
vars: string ExcelSymbol("");
vars: int GetSheet(1);
vars: int getrow(2);
vars: int getcolum(1);
vars: int RowCounter(2);
Vars:Margin$(1);
vars:double oNumvar(0);
Vars:string oStringVal("");
vars:bool getrtn(false);

If WorksheetReady then begin

For GetRow =2 to 100 begin
RowCounter=getrow;
getrtn= ELXL_GetCellStringRC(Getr ow,1,oStringVal);
ExcelSymbol= oStringVal;
print("ExcelSymbol", Excelsymbol);
If ExcelSymbol=Instrument then begin
getrtn= ElXL_GetCellNumberRC(Getr ow,12,oNumvar);
Margin$=oNumvar;
print("GetRow",Getrow);
print("margin$",margin$);
end;
end;
end;
end;
vt2009 is offline  
Reply With Quote

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


All times are GMT -4. The time now is 02:42 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.