Hi again,
I changed my MajorTrend/MinorTrend data to an array for 2 reasons :
- I want to recalculate on several bar (1 or 2) every time because I realized looking at my indicator on real time that it has some erratic behaviour on the current bar, and so I wanna be sure that if it has it, it won't record a false value
- I want to be able to create an other indicator that will show the major and minor trend.
Unfortunately, it doesn't work. The only differences with previous code is the correction you gave me (admin) and that I took out every calculation from the initialize part.