The Highest value of the last 5 minutes  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
pdemontferrier
Posts: 22
Joined: Jun 22 2017
Has thanked: 9 times
Been thanked: 2 times

Jun 22 2017

Hello everyone,
This is my first topic, I've just started with Multicharts.
I would like to get the highest value of the RSI during the last 5 closed bars.
And I wish this to be recalculated at every new bar.

I'm thinking of this code line :

Code: Select all

protected override void CalcBar(){
.....
//find highest RSI_01M over the last 5 bars
double RSI_H05_01M = RSI_01M.Highest(5);
But I'm really not sure of it, can some of you let me know if it's correct and if there is a better way to di it?
Thank you in advance for your collaborations.
Regards

User avatar
Angelina MultiСharts
Posts: 260
Joined: Dec 28 2016
Has thanked: 28 times
Been thanked: 66 times

Jun 22 2017

Hello pdemontferrier,

Welcome to our discussion forum!

It's quite hard to say without knowing what RSI_01M is. But, generally speaking, yes, the script logic is correct.