Thank you M_D for your kind words and interest. I am happy that you are sharing your thoughts so others might see some of your interests as inspiration for future developments,

I do understand that the code is not that perfect, but the errors, are to be solved with ZorroGPT, if you have any specific problem you feel you are unable to solve with ZorroGPT, please let me know, I will do my best to help you, Yeah and one more important improvement for our Zorro Platform, as we all use GPT for express developments, it will be only logical to solve bugs with the help of GPT, so you can use it more, and have a better understanding of your strategies, and ways to improve them.

Code
// Declare variables
var a, s, x;             // Scalars used in calculations
int i;                   // Index variable
vars f[10];              // Array for coefficients or signal values

// Ensure the array 'f' has values before computation
f[0] = 1; f[1] = 2; f[2] = 3; f[3] = 4; f[4] = 5; 
f[5] = 6; f[6] = 7; f[7] = 8; f[8] = 9; f[9] = 10; // Example initialization

// Compute 'filt' using ifelse() instead of ternary operators
var filt = pow(a, i) * s 
    + ifelse(i >= 1, i * x * f[1], 0) 
    - ifelse(i >= 2, 36 * pow(x, 2) * f[2], 0) 
    + ifelse(i >= 3, 84 * pow(x, 3) * f[3], 0)
    - ifelse(i >= 4, 126 * pow(x, 4) * f[4], 0) 
    + ifelse(i >= 5, 126 * pow(x, 5) * f[5], 0) 
    - ifelse(i >= 6, 84 * pow(x, 6) * f[6], 0)
    + ifelse(i >= 7, 36 * pow(x, 7) * f[7], 0) 
    - ifelse(i >= 8, 9 * pow(x, 8) * f[8], 0) 
    + ifelse(i == 9, pow(x, 9) * f[9], 0);

// Output result
printf("The value of filt is: %f", filt);

Here you will find a little bit information about Trinary operators Lite-C does not support: https://zorro-project.com/manual/en/litec_c.htm
I am sorry for the previous post, I resolved the problem, in addition there is another version of the code at : https://opserver.de/ubb7/ubbthreads...ords=TipmyPip&Search=true#Post488326

Can you tell me why do you think the syntax of the flit variable doesn't seem to be right, you can also use GPT to resolve it...
I used the correction and explained to GPT that the Trinary operators Lite-C does not support the comparison ? expression : expression; syntax. Use the ifelse statement instead.
x = (x<0 ? -1 : 1); // C/C++
x = ifelse(x<0,-1,1); // lite-C

and within less than 3 seconds the above code was produced.

If you sit with the ZorroGPT, any formula you seem to have difficulty in understanding, ZorroGPT can assist you with no problem and Think of having a PhD level programmer, helping you in any problem you have 24/7, and resolve any problem you have.

Here in the following video you can see how a Quant Trader(MSc) is using GPT for quite hard core problems in algorithmic trading:

https://www.youtube.com/watch?v=hePmohJjfLA&t=7975s

Thank you once again, and please don't hesitate to have any inquires, I will be glad to help.

Last edited by TipmyPip; 01/13/25 12:01.