NexusFi: Find Your Edge


Home Menu

 





EL Collections


Discussion in EasyLanguage Programming

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




 
Search this Thread

EL Collections

  #1 (permalink)
 Chuck6475 
Long Beach
 
Experience: None
Platform: tradestation
Trading: ES
Posts: 11 since Dec 2015
Thanks Given: 3
Thanks Received: 0

Well I'm trying to understand EL Collections. I've managed to read in a .csv file and index a specific cell in the matrix (using the examples provided in the documentation).

I understand that Tradestation stores the columns of data in "alpha" order by their header. So I built a "readheadings" ListS collection so I could duplicate the actually input order.

I can find the "row" in the matrix I want the value for but I seem to be currently stumped on how to get the values for each column in that row. The row will have both strings and numbers in it, I actually only want the numbers.

Any help would be greatly appreciated.

 
Code
using elsystem.collections ;
using elsystem ;
Inputs:

		string SetName ("Testit");
Vars:
	Inputfile("C:\Temp\xx23csv.csv"),
	Outputfile ("C:\Temp\xx25csv.csv"),
	MyMapID (MapSC.New),
	RowMapID (MapSN.New),
	CHID(ListS.New),
	ColList (0), RowNum(0), count (0), IsThere (false), number(0), index(0),rowindex(0),
	elsystem.collections.GlobalDictionary myGridDict(null),
	elsystem.collections.Vector GridName (null),
	SymbolSet(MapSN.share(SetName)), // create map or share it if it exists
	DistMap(MapNN.share("Distribution")), 
	tempList(0),Sym("");
	

	

method void AnalysisTechnique_Initialized( elsystem.Object sender, elsystem.InitializedEventArgs args ) 
begin
	Value1 = MapSc.ReadFile(MyMapID, InputFile);
	IsThere= MapSC.exists(MyMapID,"Symbol");
	Value1 = MapSC.BuildRowMap(MyMapID, RowMapID, "Symbol");
	
	Value1 = ListS.ReadHeadings(CHID, Inputfile);

	isthere=false;
	IsThere= MapSC.exists(MyMapID,"Dip");
	ColList = MapSC.get(MyMapID,"Dip");   // get the Dip column
	isthere=false;
	IsThere= MapSn.exists(RowMapID,"QQQ");
	RowNum = MapSN.get (RowMapID, "QQQ");
	Print ( ListN.get (ColList, RowNum));
	 
			count = ListS.count (CHID);
	
	Value1 = ListS.rewind(CHID);
		
	end;

	

	
method void AnalysisTechnique_UnInitialized( elsystem.Object sender, elsystem.UnInitializedEventArgs args ) 
begin

end;



method void AnalysisTechnique_WorkspaceSaving( elsystem.Object sender, elsystem.WorkspaceSavingEventArgs args ) 
begin


	end;
	
Begin
	// Read the file and the column headings
		// Process data
	
	If templist <1 then begin
	// Write the map to a file using the same column order
	Value1 = MapSC.setcolumnorder(MyMapID, CHID);
	Value1 = MapSC.writeFile(MyMapID, Outputfile);
	tempList = templist +1;
	end;
	end;

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Cheap historycal L1 data for stocks
Stocks and ETFs
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
What broker to use for trading palladium futures
Commodities
MC PL editor upgrade
MultiCharts
Quant vue
Trading Reviews and Vendors
 




Last Updated on March 6, 2016


© 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