- Topics: 78
- Replies: 102
- Posts: 180
many thanks for your fast response. But the issue seems to be more complicated than thought. Here is the screenshot of the chart:
As you can see there are numerous times when the tool moved from “1” to “-1” although it shouldn’t or stayed at “0” although there was no reason to stay there.
For example in the time period between mid October 2019 to mid January 2020 the value of the trend indicator should be always at “1”. The same is the case in the time period between end of March 2020 and mid June 2020 it should be a value of “1”. And so on.
To make my issue a little bit more clearer:
If the raw calculation (the histogram or Var3) moves from a negative value to plus 0.3 or more the trend value should be “1” at the first bar that has a raw calculation of plus 0.3 or more and this value of “1” should be in effect until a raw value of minus 0.3 or more is reached.
On the other hand, if the raw calculation (the histogram or Var3) is positive and moves to minus 0.3 or more the trend value should be “-1” at the first bar that has a raw calculation of minus 0.3 or more and this value of “-1” should be in effect until a raw value of plus 0.3 or more is reached.
Perhaps the “Switch Function” could be used.