Hello,
I a total noob in programming indicators. So I hope, someone can help me a little bit. All my tests only generates errors. I canīt draw anything in the indicatorwindow... Maybe because im to dump
OK here is, what I want to realize:
I want to build a discrete Firstorder-Butterworth-Lowpass. The time-equation looks like this originally:
Output[i] = Var_A*Input[i] + Var_A*Input[i-1] - Var_B*Output[i-1]
Var_A and Var_B are two constants f.e. 0.245 and -0.509
Input[i] is the current Close
Input[i-1] is the last/older Close
Output[i] is the current output of this formula
Output[i-1] is the last/older output of this formula
Now we can simpliefy the equation to the following a little bit:
Output[i] = Var_A * (Input[i] + Input[i-1]) - Var_B * Output[i-1]
But I am not able to implement this in an indicator. It should be printed in the pricewindow, not in an extrawindow.
I have no experience in programming with fields, so i hope, someone can help me.
PS: To get the right values, in the indicator there must be a +, not a - to get the right bars(?).
Thanks for reading