OmniTrader Professional Forum OmniTrader Professional Forum
forums calendars search
today this week
 
register logon control panel Forum Rules
You are currently browsing as a guest.
You should logon to access more features
A Self-Moderated Community - ALL MEMBERS, PLEASE READ!
Vote for Members who contribute the most to your trading, and help us moderate content within the Forums.


  Current location        Thread information  
OmniTrader Professional Forum
OmniTrader Pro General Discussion
RSI Calculation in OT versus other platforms
Last Activity 10/8/2021 3:12 PM
5 replies, 380 viewings

Jump to page : 1
Now viewing page 1 [25 messages per page]
 
back reply
Printer friendly version

^ Top
Duxx

Elite
50010010010025
Posts: 847

Joined: 2/18/2009

User Profile
 
Subject : RSI Calculation in OT versus other platforms
Posted : 2/16/2021 7:30 PM
Post #31392

Hi

I was doing some testing on RSI with OT and Other platforms (ThinkorSwim and Stockcharts)

I found discrepancies between OT and the above two platforms. TOS and Stockcharts had the same numbers / data for the RSI(14), but OT RSI (14) had different data points.

I reasoned that if both uses the same price data, and TOS and Stockcharts have the same data for RSI(14) then OT must be doing a different RSI calculation.

Here is one example - there are more:

Stock Symbol: NIO

OT - RSI(14) crossed upward the 50 lines on 4/7/20

Think or swim and Stockcharts - RSI(14) crossed upward the 50 line on 4/13/20

Is it possible that OT uses a different RSI calculation?

Thank you

^ Top
Jim Dean

Sage
20001000100100100252525
Posts: 3387

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: RSI Calculation in OT versus other platforms
Posted : 2/16/2021 7:36 PM
Post #31394 - In reply to #31392

Originally written by 210921 on 2/16/2021 8:35 PM

Probably because RSI is calculated differently in the two platforms. Original RSI uses Wilde’s Smoothing, but some platforms use EMA (faster) or SMA (choppier).


Matt Greenslet’s old (2011?) post with all the function code would tell you what OT uses. Sorry but I don’t have the link handy.

^ Top
Ken Wilsdon

Member

Posts: 15

Joined: 3/26/2018
Location: Calgary, Alberta, Canada

User Profile
 
Subject : RE: RSI Calculation in OT versus other platforms
Posted : 2/16/2021 11:03 PM
Post #31395 - In reply to #31392

Hi Duxx and Jim. Going through my numerous Nirvana bookmarks, I was able to find that forum page that Matthew Greenslet created with all the OT basic formulas. It is here in this forum. You can put "Base OT2009 Formulas" in the search box and get it. (Not too bad, Jim, only 2 years off! ;-)

Here is the complete formula for RSI in that list:

' ***************************************************************************
' * Relative Strength Index
' * by Matthew Greenslet
' *
' * Summary:
' * Indicator calculation from OT2009
' *
' * Parameters:
' * Periods
' *
'
' Copyright 2009 Nirvana Systems, Inc. Austin, Tx, USA.
' ***************************************************************************
#Indicator
#PARAM "Periods", 14
Dim fUp, fDown, fBack, fFront, fRSI as Single

If Bar >= 1 Then
fFront = C-C[1]
If fFront > 0 Then
fUp += fFront
Else
fDown -= fFront
End If

If Bar > Periods Then
fBack = C[Periods]-C[Periods+1]
If fBack > 0 Then
fUp -= fBack
Else
fDown += fBack
End If
End If

If Bar >= Periods-1 Then
fRSI = (100-(100*fDown)/(fDown+fUp))
SetScales(0, 100)
PlotLabel(30)
PlotLabel(50)
PlotLabel(70)
Plot("RSI", fRSI)
End If
End If
Return fRSI


^ Top
Duxx

Elite
50010010010025
Posts: 847

Joined: 2/18/2009

User Profile
 
Subject : RE: RSI Calculation in OT versus other platforms
Posted : 2/17/2021 4:18 PM
Post #31400 - In reply to #31394

Thank you Jim and Ken. that was very useful
^ Top
THOMAS HELGET

Legend
500252525
Posts: 594

Joined: 3/22/2006
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : RE: RSI Calculation in OT versus other platforms
Posted : 2/19/2021 11:53 AM
Post #31409 - In reply to #31395

Duxx:

TOS calculates the RSI a bit differently than Nirvana.

The difference is especially apparent at lower periodicities.

I have attached an OmniScirpt which emulates TOS's approach.

I hope you find it useful.

Tom Helget
Attached file : RSITOS.txt (2KB - 86 downloads)

^ Top
Duxx

Elite
50010010010025
Posts: 847

Joined: 2/18/2009

User Profile
 
Subject : RE: RSI Calculation in OT versus other platforms
Posted : 2/22/2021 7:27 AM
Post #31410 - In reply to #31409

Tom thank you so much. Really appreciate the help

Jump to page : 1
Now viewing page 1 [25 messages per page]
back reply

Legend    Action      Notification  
Administrator
Forum Moderator
Registered User
Unregistered User
E-Mail this thread to a friend
Toggle e-mail notification


Nirvana Systems
For any problems or issues please contact our Webmaster at webmaster@nirvsys.com.