Making bigger time frame MA into array?

bart

Active member
Joined
Jul 27, 2020
Posts
25
Likes
7
Hello,

I need some help with adding MA from other time frames but for them to print as array.

For example: 5 min chart has 5 min, 10 min, 15 min, 30 min MA.

How do I get the moving avg to be printed in a straight line until the next cande close of that following time frame? So it would not use the real time updates/

Thanks in advance,

1631591876203.png
 
The boolean 'requiresBarUpdates' in the StudyHeader is valid for the whole Study, so your higher TF will also be calculated after an iteration of Calculate or CalculateValues on the lower TF imo.

If I am right, you would need to code something along the lines of:

Code:
boolean = "check whether bar on higher TF is closed"

if (boolean){
only now calculate the line for the higher TF
draw the line
}
 
Top