>>For week bars, set BarPeriod to 7*24*60.

I am able to produce what I want by setting 1440*5.
By 7*24*60, The signal was not what I expect to see.

Which brackets do you mean?
Anyway I think I had my code corrected.
Thanks for the hint.

The code was updated.
Please look at it and let me know if it is what you think is correct.

Last edited by SFF; 01/04/13 13:10.