Easy trick for dropping first character of a string?

nadia

Trader
Aug 12, 2020
15
2
6
38
Trying to prevent excess arrays; anyone have an easy way to have for example string Array[0]="_126" be able to be subtracted straight from an integer value? Like typecasting or something?

Array[0]="_126";

I want to subtract Bars-Array[0] without needing to worry about the _ so we can effectively do the computation without generating 126 without the _ in a separate array. Does it even matter PC Run time wise?

StringToInteger(Array[0]) not it

I dont want to use anything that is not in the vain of typecasting . Know about stringsubtract etc
 
Last edited:

nadia

Trader
Aug 12, 2020
15
2
6
38
THX!! Using a DOUBLE value and (int)DoubleValue and use the decimal place values for "arrays"

String arrays look to be more memory consuming than double

Looks like it will be using doubles or just playing around with values at start of int

So just use for array 1 1value in int mode then for the 1value array now need to find way to skip the first 2 digits of the int in the most memory efficient way since I want to replicate a 2 dimensional array
 

nadia

Trader
Aug 12, 2020
15
2
6
38
I thought having a single ushort array at 2 mem per array element better than 2 dimensional string array which is 1 mem per character ; if I'm correct
 

nadia

Trader
Aug 12, 2020
15
2
6
38
I mean a 2-dimensiinal ushort array (or whatever your actual application demands).
Was going to use that but it does not really seem to affect run time as ints seem to perform as well by microsecond count in the tester; am I wrong for some other reason? I haven't profiled it bc the profiler doesnt work on tester and I've never really gotten to profiling anything yet on a live chart mt4 bc tester profiler doesnt work as Id need to leave pc on for a week or so; looks like will have to do eventually
So just using 2 int arrays bc run time not affected by ushort it seems to be so no real benefit and ints have larger capacity for value and can be negative