I am triying to define a strategy to get returns accumullated per day of week, my goal is store the Close-Open= return per each day...monday, tuesday.. and when we reach the last bar to write to file this value.
My approach till now is I can store this value per bar in each iteration of on bar update and in excel manage it but this is not the right way. Also a I can store my final values per each day of week but i cannot find where I have to locate my writeline code to write to file just before stratety finish, I already try do it with bar.count and currenbar, also with state,terminated but I could not figure it, please if somebody can help me.
Regards.
Comment