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.


This message cannot be deleted. It is the first message of the thread.
Administrators or moderators may choose to delete the entire thread


 


This accout has been deleted
 
Subject : Help with making system out indicator.
Posted : 1/26/2015 12:53 PM
Post #23318

I modified a stochastic momentum indicator by Mel Dickover by adding a signal line and using the original formula by Blau. Since I no experience with programming, I was amazed that it works just like the TOS platform indicator. I want to make a system that produces a long signal when the SMI line crosses above signal line and vice versa for the short signal. I also wanted to produce code to do the same in omniscan. Unfortunately, as this indicator is coded, I have no idea how to do this. I don't know how to access "SMI" to write a crossover with the EMA(3) of the SMI. Any nudges in the right direction would be greatly appreciated. Indicator code listed below:

#Indicator
'MySMI
'Stochastic Momentum Index indicator
'with signal line
'Based off initial indicator, SMI
' Coded by Mel Dickover April 2012
'------------------------------------------
#param "lookback", 5
#param "thresholdLong",-80
#param "thresholdShort",+80

dim temp1, temp2, temp3, temp4, temp5, temp6 as single
dim x as single
dim y as single

temp1 = (HHV(H,lookback)+LLV(L,lookback))*0.5 ' C
temp2 = C[0] - temp1 ' D
temp3 = EMA(temp2,3) 'DS1
temp4 = EMA(temp3,3) 'DS2
temp5 = EMA((HHV(H,lookback) - LLV(L,lookback)),3) 'DHL
temp6 = ema(temp5*0.5,3) 'DHL2
x = 100*(temp4/temp6)
y = EMA(x,3)

plot("SMI",x)
plot("Signal line",y)
plot("Thresholdlong",thresholdLong)
plotLabel(thresholdLong)
plot("Thresholdshort",thresholdShort)
plotLabel(thresholdshort)

Return x ' Return the value calculated by the indicator
Return y ' Return the value calculated by the signal line


Attached file : mySMI.PNG (111KB - 413 downloads)

Deleting message 23318 : Help with making system out indicator.


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