Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator displaying expressions / spreads / pairs / baskets

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Indicator displaying expressions / spreads / pairs / baskets

    Please note: As the whole NT Version 7 Beta forum is locked now, please continue submitting any questions preferably here http://www.ninjatrader.com/support/f...ad.php?t=38011
    or here http://www.ninjatrader.com/support/f...ink&linkid=399

    NinjaTrader Ultimate Expression Indicator
    =========================================
    There're couple of indicators that allow to plot spreads. However,
    all of them have severe limitations as to number of legs and mathematical
    complexity of expressions one can input. As none of them really
    suit my needs I decided to develop a new indicator from scratch that would
    overcome these shortcomings. The indicator I've developed allows to include
    any number of legs, input any meaningful math. expression and also implements
    variety of math. functions.


    Examples:
    ---------
    (1 + LOG10(1) + SQRT(0.5 + 3.5) + 3)/(1+RANDOM(1,5))
    (3*'MSFT'+1.5*'ORCL'+2*'HPQ'+'IBM')/(5*"QQQQ")
    ('AAPL:Open'+'AMZN:High'+'MSFT:Low'+'IBM:Close')/(12*'QQQQ')
    "ES 09-10:BidAskMid$"-'YM 09-10:BidAskMid$'
    '$EURCAD:High'/'$EURAUD:Low'
    (("NQ 09-10:H"-"NQ 09-10:L")/2.0)/"NQ 09-10:Volume"
    ('ES 09-10:$2'+'ES 09-10:$1')/(2*'ES 09-10:$0')
    'ES 09-10:$Open@1Week'-'ES 09-10:$Close@1Day'


    Math:
    -----
    - always use dot(.) to denote decimal places regardless of your
    operating system settings or localization (e.g.: 1.23, -0.6, +3.33)
    + - addition
    - - subtraction
    / - division
    * - multiplication
    % - modulus
    ^ - power
    ( - left bracket
    ) - right bracket


    Instruments:
    ------------
    - all instrument types are supported (stocks 'MSFT', futures 'ES 09-10',
    currencies '$EURUSD', indexes '^VIX')
    - instruments don't need to be explicitly added to the chart to be able to
    use them in expressions
    - instruments must always be enclosed in single or double quotation marks
    - instruments, instrument qualifiers and instrument time frames are case
    insensitive
    - instrument qualifiers are optional, if omitted bar close value is used
    - instrument time frames are optional, if omitted time frame of primary
    (first) instrument in the chart is used

    - 'InstrumentName:Qualifier@TimeFrame'
    - "InstrumentName@TimeFrame:Qualifier"
    - 'InstrumentName:Qualifier'
    - "InstrumentName@TimeFrame"
    - 'InstrumentName'


    Instrument qualifiers:
    ----------------------
    - use 'colon' ( to indicate beginning of instrument qualifier sequence
    - use 'dollar sign' ($) to multiply instrument value by instrument point
    value that is taken from the Instrument Manager, this qualifier can be
    combined with others
    - use any integer number greater than or equal to zero to denote how
    many bars to look back (bars ago) from bar that is being processed,
    'zero' is default value and referes to current bar, this qualifier
    can be combined with others
    - following qualifiers are self explanatory and cannot be combined
    with each other:
    - O or Open
    - H or High
    - L or Low
    - C or Close - this is default value
    - V or Volume
    - B or Bid
    - A or Ask
    - BAM or BidAskMid


    Instrument time frames:
    -----------------------
    - use 'at' (@) to indicate beginning of instrument time frame sequence
    - time frame comprises two mandatory components: period value
    and period type
    - period value is any integer number greater than zero
    - period type is any of the following values:
    - S or Second
    - M or Minute
    - D or Day
    - W or Week
    - Y or Year
    - T or Tick
    - V or Volume
    - R or Range


    Functions:
    ----------
    - functions are case insensitive
    - unless specified otherwise functions take one argument

    random - returns random number within the specified range, requires two arguments
    power - returns number raised to the specified power, requires two arguments
    abs - returns absolute value of the specified number
    sqrt - returns square root of the specified number
    ceiling - returns the smallest integer greater than or equal to the specified decimal number
    floor - returns the largest integer less than or equal to the specified decimal number
    round - rounds decimal number to nearest integer
    ln - returns natural logarithm of the specified number
    log10 - returns base-10 logarithm of the specified number
    sin - returns sine of the specified number
    cos - returns cosine of the specified number
    tan - returns tangent of the specified number
    arcsin - returns arcsine of the specified number
    arccos - returns arccosine of the specified number
    arctan - returns arctangent of the specified number


    If you're missing some feature, have a suggestion or have found a bug,
    just leave a message in NT discussion forum. I'll be more than happy
    to implement it provided that other users would also benefit.


    Enjoy and good luck with your trading endeavours.

    -UltimateIndicator-


    Installation
    ============
    - open up NinjaTrader, go to File -> Utilities -> Import NinjaScript,
    navigate to 'zip' installation fileand click open,
    restart NinjaTrader if prompted to do so
    - this indicator requires NinjaTrader 7.0.0.16 or higher
    - installation 'zip' file contains files:
    NinjaTrader.Ultimate.Expression.dll
    screenshot.png
    readme.txt


    Version history
    ===============

    Version 0.1.3.0 - 31/01/2011
    ----------------------------
    - improved - minor internal improvements, new features to come soon (hopefully)


    Version 0.1.2.0 - 01/11/2010
    ----------------------------
    - added - front end to build and manage database of favorite expressions


    Version 0.1.1.0 - 02/08/2010
    ----------------------------
    - added - support for time frames
    - improved - instrument qualifiers can be used to address previous bars
    - improved - indicator property window stays opened when expression
    has syntax errors
    - fixed - the indicator didn't work when nested within other indicators
    - fixed - the indicator was not updated when NT was using realtime data


    Version 0.1.0.0 - 13/07/2010
    ----------------------------
    - initial release
    Last edited by UltimateIndicator; 01-31-2011, 04:13 PM. Reason: Newer version

    #2
    Hi UltimateIndicator,

    Thanks, looks interesting!

    Will you also please post this to the file sharing section of the Forum as well?
    TimNinjaTrader Customer Service

    Comment


      #3
      I think I've found a bug in the 'Indicator section' of this forum. If you need to re-upload an installation file with different file name, new file name is not saved into the system and users are prompted to save the file under old name but content of the file is the latest though.

      http://www.ninjatrader.com/support/f...id=399&catid=4

      Can someone have a look, please?

      Comment


        #4
        Hi UltimateIndicator,

        This may be the known and expected behavior, as I've seen it previously. However, I will have the appropriate person look in to this.
        TimNinjaTrader Customer Service

        Comment


          #5
          This looks really interesting.

          when using indicatorsin the expression is this what they would look like?

          IBM:Close/(SMA(IBM:Close:30)[0])

          Comment


            #6
            mike82,

            To get the close of IBM you would need to create a multi-series indicator that has IBM added to it.

            Add("IBM", PeriodType.Minute, 1);

            Then in your code you could do something like:

            Closes[1][0] / SMA(Closes[1], 30)[0]

            Please see this article for multi-series scripts: http://www.ninjatrader.com/support/h...nstruments.htm

            For use with what UltimateIndicator provided though, I believe what you have posted would work as he has designed it, but UltimateIndicator would have to clarify that.

            UltimateIndicator,

            Would you mind uploading a source code version of your script? We cannot host DLLs here because we do not know what is within the code and cannot guarantee the safety of them. Thank you.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Can't find indicator after install

              I've successfully installed the Ninjascript. What name appears in the indicator list for the UltimateExpression indicator? I've closed and reopened NT7 twice but can't find the installed indicator to load it. It looks valuable so I'm anxious to succeed.

              Thank you!

              All the best.

              you may email me at [email protected]

              Comment


                #8
                Hi ProfitPilgrim,

                Looks like the name has an underscore "_" in front, look to the top of your indicator lists.
                TimNinjaTrader Customer Service

                Comment


                  #9
                  Thanks Tim. You found it for me. Is there a way to modify 'ES 12-10:$' * 'E7 12-10:$' to reference the highs only?

                  Comment


                    #10
                    HI ProfitPilgrim,

                    I am not intimately familiar with this specific script, however if it references the charted data, you can change that at "Right click>Indicators>Input Series>High"
                    TimNinjaTrader Customer Service

                    Comment


                      #11
                      Thanks Tim. I've discovered that the indicator disregards which price of the input series is selected and relies solely on the formula entered. An H or L after the colons will select the High or Low, as with 'ES 12-10:L' * 'E7 12-10:L'

                      Comment


                        #12
                        This looks like excellent work. Is it correct that it has NinjaTrader's tacit approval as a safe dll since it is posted for download?

                        Comment


                          #13
                          Hello Tarkus11,

                          Thank you for your post.

                          When you download any indicator, strategy, script, etc. you agree to the following item in the disclaimer:
                          7. By installing, using in whole or in part any code posted in this forum you agree to fully indemnify and hold harmless NinjaTrader, LLC and its affiliates from and against any claims, losses, liabilities and expenses that may be incurred as a result having downloaded and/or used any or all of the available code.

                          Please let me know if you have any additional questions.
                          ChipNinjaTrader Customer Service

                          Comment


                            #14
                            Thanks for the reply. I was referring to the post made by NinjaTrader_Josh. I understand that code is run at your own risk, but the policy was not to host compiled scripts. While this looks like excellent work, it is still compiled as far as I can see, as the .cs apparently isn't available.

                            Originally posted by NinjaTrader_Josh View Post
                            Would you mind uploading a source code version of your script? We cannot host DLLs here because we do not know what is within the code and cannot guarantee the safety of them. Thank you.

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by lightsun47, Today, 03:51 PM
                            0 responses
                            5 views
                            0 likes
                            Last Post lightsun47  
                            Started by 00nevest, Today, 02:27 PM
                            1 response
                            10 views
                            0 likes
                            Last Post 00nevest  
                            Started by futtrader, 04-21-2024, 01:50 AM
                            4 responses
                            46 views
                            0 likes
                            Last Post futtrader  
                            Started by Option Whisperer, Today, 09:55 AM
                            1 response
                            14 views
                            0 likes
                            Last Post bltdavid  
                            Started by port119, Today, 02:43 PM
                            0 responses
                            10 views
                            0 likes
                            Last Post port119
                            by port119
                             
                            Working...
                            X