OmniTrader Professional Forum - OmniLanguage Discussion
Moving Average of the RelMom ind. return value

^ Top
FransA

Posts: 61

Joined: 9/3/2010
Location: Zevenaar, Nederland

User Profile
 
Subject : Moving Average of the RelMom ind. return value
Posted : 11/26/2014 12:39 PM
Post #23174

#indicator

'MyRelMomInd

#PARAM "pPds", 30, 5, 100

Dim fRetVal, fhelp1, fIndex , fhelp2, as Single

fhelp1= GetClose("$DJI")
fhelp2= GetClose(SPY)

'fRetVal= RelMom( pPds,SPY )

Return fRetVal

I would like to create a moving average of the Secret Sauce RelMom indicator return value. It is impossible to get a return value of the RelMom indicator because SPY is not good defined. Also not, to put SPY in a variable. I have done some experiments but no results. Is there somebody who can help me?
Thank you in advance.

Frans
^ Top
THOMAS HELGET

Posts: 610

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

User Profile
 
Subject : RE: Moving Average of the RelMom ind. return value
Posted : 11/26/2014 7:21 PM
Post #23175 - In reply to #23174

Frans:

See if this is what you wanted:

#indicator

'MyRelMomInd

#PARAM "pPds", 30, 5, 100

Dim fRetVal, fhelp1, fIndex, fhelp2, MAvRelMom as Single

fhelp1= GetClose("$DJI")
fhelp2= GetClose("SPY")

fRetVal= RelMom( pPds, "SPY" )

MAvRelMom = SMA(fRetVal, 14)

Plot( "Rel Mom MA", MAvRelMom )


Return MAvRelMom


Tom Helget
^ Top
FransA

Posts: 61

Joined: 9/3/2010
Location: Zevenaar, Nederland

User Profile
 
Subject : RE: Moving Average of the RelMom ind. return value
Posted : 11/27/2014 4:12 AM
Post #23176 - In reply to #23174

Hi Tom

Yes, Tom that is what I wanted.

Thank you very much.

Frans


https://www.omnitrader.com/currentclients/proforum/thread-view.asp?threadid=4211&posts=3