This is primarily a request for someone to help with a C# snippet
The code that I need is to be able to determine the value setting for non-time based bars.
and need to extract the setting used for various types, Tick, Renko, Range, etc.
The code below will return the desired information which is in a string format:
if(Bars.BarsType.DisplayName == "SveRenko")
do something
The code:
Print(" Period: " + Bars.BarsType.Period.ToString());
returns:
Period: SveRenko 10 Ticks
which has the needed information in the string
note: the ToString() in the above code was probably not necessary as it was a string already
What I need is to be able to extract the numeric portion from the string and convert it to an integer. No other information is needed.
Might it be possible for someone to develop the parsing code to extract and convert the number to an integer? The code should be as generic as possible because it will be used for other bar types
Of course if there is a better way of getting that information I would welcome it.
Thank you for your assistance.
Comment