Select Page

# Script question

Optuma Forums Optuma Scripting Script question

Viewing 5 posts - 1 through 5 (of 5 total)
• Author
Posts
• #61949
Stephen
• Topics: 5
• Replies: 4
• Posts: 9

If I code MFI(BARS=2) IsUp, which RSI will it use: a 2 period RSI or just the last two candles of RSI?

#61951
Stephen
• Topics: 5
• Replies: 4
• Posts: 9

or MFI as written here

#61955
Darren
• Topics: 66
• Replies: 634
• Posts: 700

Hi Stephen,

It will just use MFI() but you can nest RSI within MFI. For a 2 bar MFI of a 2 bar RSI use this:

However, as the MFI() uses volume in its calculation I’m not sure if it can be used on an RSI.

#61959
Stephen
• Topics: 5
• Replies: 4
• Posts: 9

Thank you but how would you just read this: MFI(BARS=2)? is it just saying the last two price candles showed MFI increasing on both candles? Which RSI setting is it using? RSI 2 not RSI 14?

#61965
Darren
• Topics: 66
• Replies: 634
• Posts: 700

Hi Stephen,

MFI(Bars=2) will just give the value based on the price chart. MFI(Bars=2) IsUp will give a true condition if the value is higher than the previous bar.

As per the KnowledgeBase article this is how the MFI is calculated, so RSI values aren’t used:

1. For each bar, average the High, Low, and Close.

2. The MF value is equal to the Average x Volume.

3. If the value in step 1 is higher than the previous, it is considered to be a positive money value, otherwise negative. The positive money flow is then the sum of all the positive money values over the number of bars.

4. The money ratio is then + MF divided by -MF.

5. The Index is then 100 – (100 / (1 + Money Ratio)).

• This reply was modified 6 months ago by Darren.
Viewing 5 posts - 1 through 5 (of 5 total)
• You must be logged in to reply to this topic.