@rafaels919 Hi!
That's right, my approach is to convert the sequence string to an int array (because you can't use a string in any calculation). This converting is done in the "on Init" tab.
- What is the Variable "seq[]" used for?
This is a special kind of variable: an array. Arrays dont store just one value, but multiple values - like a list, or a table.
In MQL, array indexing starts from 0, so the first value of your sequence is seq[0] = 1,
if the original sequence string was "1,2,3,4,5,6".
Last value would be seq[5].

^ This part is for resetting the sequence, in case we go to a 7th loss (and the array doesn't have a value for that). "seqLen" is the size of the array, and because arrays start from 0, the actual last index in the array is seqLen - 1.
I admit, this is very confusing setup, lol. But you don't necessarily need to know every detail, just know that you can modify the loses variable to set the sequence to whatever value you like.
If you want revert to 2nd sequence value, modify variable loses to 1.
For 3rd sequence value, modify variable loses to 2.