NexusFi: Find Your Edge


Home Menu

 





How to split a sting with comma and put into an array


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one ABCTG with 4 posts (6 thanks)
    2. looks_two ShahramTor with 3 posts (0 thanks)
    3. looks_3 huzisg with 2 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 6,105 views
    2. thumb_up 6 thanks given
    3. group 4 followers
    1. forum 10 posts
    2. attach_file 0 attachments




 
Search this Thread

How to split a sting with comma and put into an array

  #11 (permalink)
ancapellen
Luxembourg Luxembourg
 
Posts: 1 since Jul 2018
Thanks Given: 0
Thanks Received: 0

Had similar questions around string manipulation more generally in easylanguage with TradeStation, and landed on this thread. In case it might be helpful to others: I ended up using the ELString class (in the elsystem namespace), and then had access to a good list of string manipulation functions. Simply assign the string you want to manipulate or inspect to an ELString object, and then use the functions of the ELString class.

Here a simple example using the IndexOf and Substring functions:
 
Code
variables:
	elString _symbol(""),
	int _space(0);

// for options, strip out the option details from Symbol
_symbol = Symbol;
_space = _symbol.IndexOf(" ");
if (_space > 0) then _symbol = Symbol.Substring(0, _space);
Print(_symbol);
For the full list of functions, just search for "ELString Class" in TS Platform Help. There is also a Split function.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
MC PL editor upgrade
MultiCharts
REcommedations for programming help
Sierra Chart
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
31 thanks
Spoo-nalysis ES e-mini futures S&P 500
28 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
20 thanks
GFIs1 1 DAX trade per day journal
17 thanks




Last Updated on August 18, 2018


© 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