Jump To Forum
Category : OmniTrader Professional Forum
- What's New
- OmniTrader Pro General Discussion
- OmniLanguage Discussion
- Omni Pilot Discussion
- Trade Plans In Strategies
- Feature Requests
- Integrated Brokerage
Category : OmniTrader Pro Resource Forum
- OmniTrader Pro Technical Support
- OmniTrader Pro Frequently Asked Questions
- OmniLanguage Frequently Asked Questions
- OmniPilot Frequently Asked Questions
- Tutorials & Additional Resources
- Technical Analysis Library
You are currently browsing as a guest.
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.
Only forum moderators may post in this forum.
You are editing a message originally written by mgreenslet on 12/2/2008
OmniLanguage indicators can be referenced in other OmniLanguage Scripts, Color Charts, OmniScan lists, Setups, and Strategy Filters. Your scripts will not show in the list to the right in the formula builder; however, all you need to do to reference your script is to call it by the same name of the file you created. It is important to note that if your script contains and #PARAM statements you MUST pass in the value you want to use for the parameter. For example I have created a new indicator called MySMA. The code used is as follows. #Indicator #PARAM "Periods", 20 Dim fSMA as Single fSMA = Sum(Close, Periods) fSMA /= Periods PlotPrice("SMA", fSMA) Return fSMA If I wanted to reference this indicator elsewhere, say a color chart, I would simply type MySMA(15). Notice how I am passing in 15 to tell my color chart rule what periodicity I want to use. Say I added a second parameter to MySMA, perhaps a second periodicity to smooth the SMA. Again I need to tell it what values to use for the parameters so I would call it by typing MySMA(15, 40). If your script contains no parameters you MUST still use empty parenthesis such as MySMA(). If you do not have the parenthesis at the end, other scripts will view it as a variable and not a function call to your indicator which will result in a compile error telling you MySMA is not defined.
Registration req. : Off
HTML : On
Anon. posting : Off
IP visible : Off
Notify you whenever this thread is updated?
Include signature in this post?
For any problems or issues please contact our Webmaster at