EasyLanguage and Excel - An Example - EasyLanguage Programming | futures io social day trading
futures io futures trading


EasyLanguage and Excel - An Example
Updated: Views / Replies:6,425 / 3
Created: by ericbrown Attachments:3

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

EasyLanguage and Excel - An Example

  #1 (permalink)
 Vendor: sentimentrader.com 
Tulsa, OK
 
Futures Experience: Advanced
Platform: Tradestation, TOS, Python
Broker/Data: IQFeed, Tradestation, TOS
Favorite Futures: ES, SPY, Options
 
ericbrown's Avatar
 
Posts: 201 since Jan 2011
Thanks: 339 given, 234 received

EasyLanguage and Excel - An Example

Just wanted to share a quick example of how I'm using the Excel Class within TradeStation (ver 9.x). The Excel Class is documented pretty well and a demo is provided at https://community.tradestation.com/Discussions/Topic.aspx?Topic_ID=114780 (not sure if its OK to share that demo file here...so I'm just linking to it for those of you who have TradeStation accounts).

Some background:

I like to calculate my own pivots for indexes, futures and some stocks. I use these pivots as a general area of support/resistance and/or inflection. I use CSI Unfair Advantage for data and run an R script to pull data from CSI UA and then write out my Pivots.xls file every morning. This file is then used to auto-load my pivots, R's and S's in TradeStation .

The code below will read from the excel spreadsheet with worksheet name in the row given starting in the column given. It will then draw the Pivot, R's and S's on the chart for that symbol. I've attached the ELD, TXT version and my Pivots.xls file for your review.

Hope this is useful for others working with Excel and Tradestation. If you find any errors with this, let me know...i've been using it without issue for a few days now.

To use this, import the ELD and put the XLS on your "C:\" Drive (or change the path to the XLS to wherever you'd like to save it).

 
Code
{ set the namespaces that will be used }
using elsystem.office.excel ;
using elsystem.collections ;
using elsystem ;

{Inputs}
inputs:
    string WorkbookName( "C:\Pivots.xls" ), { The path, filename, and extension must be correct for the file. }
    string SheetName( "Pivots" ), { sheet where the information is located }
    TimeBegin(0001), 
    TimeEnd(2359),
    int column_cell(3), {this is the excel column that the Pivot is in. The program then takes and adds +1 to each column for he next # }
    int row_cell(6); {this is the row in the excel sheet for this symbol.}
    
{Set my variables}    
variables:
    float PivotPoint (0.00),
    float R1(0.00),
    float R2(0.00),
    float R3(0.00),
    float S1(0.00),
    float S2(0.00),
    float S3(0.00),
    Workbook WB1( NULL ); { Workbook object }
    

    
    { instantiate a new Workbook object and set its properties.}
    once WB1 = new Workbook ;
    once WB1.FileName = WorkbookName ;
    once WB1.Shared = true ;
    once WB1.Visible = false ;
    once WB1.Load = true ;
    once WB1.SaveOnClose = false ;
    


{ Get the pivot, R's and Support's from the excel file }
once PivotPoint = WB1.sheets[SheetName].CellsAsDouble[column_cell,row_cell] ;
once R1 = WB1.sheets[SheetName].CellsAsDouble[column_cell+1,row_cell] ;
once R2 = WB1.sheets[SheetName].CellsAsDouble[column_cell+2,row_cell] ;
once R3 = WB1.sheets[SheetName].CellsAsDouble[column_cell+3,row_cell] ;
once S1 = WB1.sheets[SheetName].CellsAsDouble[column_cell+4,row_cell] ;
once S2 = WB1.sheets[SheetName].CellsAsDouble[column_cell+5,row_cell] ;
once S3 = WB1.sheets[SheetName].CellsAsDouble[column_cell+6,row_cell] ;


{Set Pivot}
Value1=TL_New(D,TimeBegin,PivotPoint,D,    TimeEnd,PivotPoint);
    TL_SetColor(Value1,cyan);
    TL_SetSize(Value1,0);
    TL_SetStyle(Value1,Tool_dotted);
    TL_SetExtRight(Value1,TRUE);
    
{Set S1}
Value3=TL_New(D,TimeBegin,S1,D,    TimeEnd,S1);
    TL_SetColor(Value3,RGB(255,128,0));
    TL_SetSize(Value3,0);
    TL_SetStyle(Value3,Tool_dotted);
    TL_SetExtRight(Value3,TRUE);

{Set S2}
Value5=TL_New(D,TimeBegin,S2,D,TimeEnd,S2);
    TL_SetColor(Value5,RGB(255,128,0));
    TL_SetSize(Value5,0);
    TL_SetStyle(Value5,Tool_dotted);
    TL_SetExtRight(Value5,TRUE);

{Set S3}
Value7=TL_New(D,TimeBegin,S3,D,TimeEnd,S3);
    TL_SetColor(Value7,RGB(255,128,0));
    TL_SetSize(Value7,0);
    TL_SetStyle(Value7,Tool_dotted);
    TL_SetExtRight(Value7,TRUE);

{Set R1}
Value9=TL_New(D,TimeBegin,R1,D,TimeEnd,R1);
    TL_SetColor(Value9,RGB(255,84,76));
    TL_SetSize(Value9,0);
    TL_SetStyle(Value9,Tool_dotted);
    TL_SetExtRight(Value9,TRUE);

{Set R2}
Value11=TL_New(D,TimeBegin,R2,D,TimeEnd,R2);
    TL_SetColor(Value11,RGB(255,84,76));
    TL_SetSize(Value11,0);
    TL_SetStyle(Value11,Tool_dotted);
    TL_SetExtRight(Value11,TRUE);

{Set R3}
Value13=TL_New(D,TimeBegin,R3,D,TimeEnd,R3);
    TL_SetColor(Value13,RGB(255,84,76));
    TL_SetSize(Value13,0);
    TL_SetStyle(Value13,Tool_dotted);
    TL_SetExtRight(Value13,TRUE);

Attached Files
Register to download File Type: eld CUSTOM_PIVOTS_CSV.ELD (8.6 KB, 102 views)
Register to download File Type: xls Pivots.xls (23.0 KB, 124 views)
Register to download File Type: txt CUSTOM_PIVOTS_CSV.TXT (2.9 KB, 94 views)
Reply With Quote
The following 4 users say Thank You to ericbrown for this post:
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,354 given, 83,237 received


Very nice, thanks for sharing.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #4 (permalink)
Elite Member
Montreal, Canada
 
Futures Experience: Intermediate
Platform: Multicharts
Broker/Data: Interactive Broker
Favorite Futures: Forex
 
Posts: 262 since Sep 2010
Thanks: 436 given, 86 received


ericbrown View Post
Just wanted to share a quick example of how I'm using the Excel Class within TradeStation (ver 9.x). The Excel Class is documented pretty well and a demo is provided at https://community.tradestation.com/Discussions/Topic.aspx?Topic_ID=114780 (not sure if its OK to share that demo file here...so I'm just linking to it for those of you who have TradeStation accounts).

Some background:

I like to calculate my own pivots for indexes, futures and some stocks. I use these pivots as a general area of support/resistance and/or inflection. I use CSI Unfair Advantage for data and run an R script to pull data from CSI UA and then write out my Pivots.xls file every morning. This file is then used to auto-load my pivots, R's and S's in TradeStation .

The code below will read from the excel spreadsheet with worksheet name in the row given starting in the column given. It will then draw the Pivot, R's and S's on the chart for that symbol. I've attached the ELD, TXT version and my Pivots.xls file for your review.

Hope this is useful for others working with Excel and Tradestation. If you find any errors with this, let me know...i've been using it without issue for a few days now.

To use this, import the ELD and put the XLS on your "C:\" Drive (or change the path to the XLS to wherever you'd like to save it).

 
Code
{ set the namespaces that will be used }
using elsystem.office.excel ;
using elsystem.collections ;
using elsystem ;

{Inputs}
inputs:
    string WorkbookName( "C:\Pivots.xls" ), { The path, filename, and extension must be correct for the file. }
    string SheetName( "Pivots" ), { sheet where the information is located }
    TimeBegin(0001), 
    TimeEnd(2359),
    int column_cell(3), {this is the excel column that the Pivot is in. The program then takes and adds +1 to each column for he next # }
    int row_cell(6); {this is the row in the excel sheet for this symbol.}
    
{Set my variables}    
variables:
    float PivotPoint (0.00),
    float R1(0.00),
    float R2(0.00),
    float R3(0.00),
    float S1(0.00),
    float S2(0.00),
    float S3(0.00),
    Workbook WB1( NULL ); { Workbook object }
    

    
    { instantiate a new Workbook object and set its properties.}
    once WB1 = new Workbook ;
    once WB1.FileName = WorkbookName ;
    once WB1.Shared = true ;
    once WB1.Visible = false ;
    once WB1.Load = true ;
    once WB1.SaveOnClose = false ;
    


{ Get the pivot, R's and Support's from the excel file }
once PivotPoint = WB1.sheets[SheetName].CellsAsDouble[column_cell,row_cell] ;
once R1 = WB1.sheets[SheetName].CellsAsDouble[column_cell+1,row_cell] ;
once R2 = WB1.sheets[SheetName].CellsAsDouble[column_cell+2,row_cell] ;
once R3 = WB1.sheets[SheetName].CellsAsDouble[column_cell+3,row_cell] ;
once S1 = WB1.sheets[SheetName].CellsAsDouble[column_cell+4,row_cell] ;
once S2 = WB1.sheets[SheetName].CellsAsDouble[column_cell+5,row_cell] ;
once S3 = WB1.sheets[SheetName].CellsAsDouble[column_cell+6,row_cell] ;


{Set Pivot}
Value1=TL_New(D,TimeBegin,PivotPoint,D,    TimeEnd,PivotPoint);
    TL_SetColor(Value1,cyan);
    TL_SetSize(Value1,0);
    TL_SetStyle(Value1,Tool_dotted);
    TL_SetExtRight(Value1,TRUE);
    
{Set S1}
Value3=TL_New(D,TimeBegin,S1,D,    TimeEnd,S1);
    TL_SetColor(Value3,RGB(255,128,0));
    TL_SetSize(Value3,0);
    TL_SetStyle(Value3,Tool_dotted);
    TL_SetExtRight(Value3,TRUE);

{Set S2}
Value5=TL_New(D,TimeBegin,S2,D,TimeEnd,S2);
    TL_SetColor(Value5,RGB(255,128,0));
    TL_SetSize(Value5,0);
    TL_SetStyle(Value5,Tool_dotted);
    TL_SetExtRight(Value5,TRUE);

{Set S3}
Value7=TL_New(D,TimeBegin,S3,D,TimeEnd,S3);
    TL_SetColor(Value7,RGB(255,128,0));
    TL_SetSize(Value7,0);
    TL_SetStyle(Value7,Tool_dotted);
    TL_SetExtRight(Value7,TRUE);

{Set R1}
Value9=TL_New(D,TimeBegin,R1,D,TimeEnd,R1);
    TL_SetColor(Value9,RGB(255,84,76));
    TL_SetSize(Value9,0);
    TL_SetStyle(Value9,Tool_dotted);
    TL_SetExtRight(Value9,TRUE);

{Set R2}
Value11=TL_New(D,TimeBegin,R2,D,TimeEnd,R2);
    TL_SetColor(Value11,RGB(255,84,76));
    TL_SetSize(Value11,0);
    TL_SetStyle(Value11,Tool_dotted);
    TL_SetExtRight(Value11,TRUE);

{Set R3}
Value13=TL_New(D,TimeBegin,R3,D,TimeEnd,R3);
    TL_SetColor(Value13,RGB(255,84,76));
    TL_SetSize(Value13,0);
    TL_SetStyle(Value13,Tool_dotted);
    TL_SetExtRight(Value13,TRUE);

Hello

I don't have access to TradeStation site and I got interogation. Maybe a dummy question

What kind of functions could you get using using elsystem.office.excel ;

Do you know if this file is compatible with Multicharts?

I'm working with Multicharts and I'm looking to convert to MC 64. But I need to find a way to keep my connection with Excel.

Have a good day
Martin

Reply With Quote

Reply



futures io > > > > > EasyLanguage and Excel - An Example

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Other]       Excel Analysis Tool? DarkPool Platforms and Indicators 12 November 15th, 2011 08:41 PM
excel trading journals madLyfe Psychology and Money Management 5 September 11th, 2011 11:01 PM
Excel for updating zones Avartanian EasyLanguage Programming 2 August 25th, 2011 02:35 PM
Automatically update in EXCEL gparkis Platforms and Indicators 3 August 15th, 2011 02:52 PM
Using EleXcel, interface to Excel arjfca MultiCharts 2 June 16th, 2011 09:18 AM


All times are GMT -4. The time now is 08:43 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-16 in 0.09 seconds with 20 queries on phoenix via your IP 54.160.245.121