"Spread filter" block always set 5.0 fixed pips in the code
-
Hi @fxDreema
It looks like if the "Spread filter" block is always setting 5.0 as the value for the "spread" field even though it is set a different value or a constant.

Might it be related to the next code part?

Thanks for looking over this issue.
-
-
Well, you can get very confused if you are looking at the code. I am using many classes linked together. In the past each block had it's own code, but the downside was that if you let's say use the same block copied 20 times in the project, the same code is printed in the source code 20 times. Then I introduced those classes and now the main code of the block is written 1 time (for most blocks, not for all) in a class that I call "model", and 1 separate class for each block where the parameters are set.
So, in your screenshot what we have is one class that is the model for "Spread Filter", and in this class we have a constructor. What is a constructor? Some part of the class that is called once when we make instance of the class. In short, that value 5 is the initial value and it could be changed for every unique block. The actual value for "maxSpread" is set somewhere else in the code.