Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

JKHiLo indicator in S&C oct 2011

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

    JKHiLo indicator in S&C oct 2011

    I have downloaded the indicator as published but get no plot. I am trading futures 6E, ZB and TF. I am not at all experienced in creating indicators but do have a very basic grasp of the script. Can this indicator be used for the above futures? (I am assuming it is using the nasdaq data as per the article so should be plotting something).
    If my data supplier doesn't recognize the symbols used or I want to use data for the S & P or Russell or another index, do I just alter the code in lines 45, 46, 47? Where do I find the names for the scripts to reference? "N" I assume references the Nasdaq, does "S" reference the S & P - "R" the Russell etc Where can I look this up?

    I have included the relevent lines from the original script posted on the S&C website:

    [Description("Stocks and Commodities - October 2011 - The JKHiLo Index")]
    public class JKHiLo : Indicator
    {
    #region Variables
    private double A;
    private double B;
    private double C;
    private double D;
    private DataSeries E;
    private double F;
    private double G;
    private DataSeries H;
    private double I;
    private double J;
    #endregion

    /// <summary>
    /// This method is used to configure the indicator and is called once before any bar data is loaded.
    /// </summary>
    protected override void Initialize()
    {
    Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
    Overlay = false;
    Add(new Line(Color.FromKnownColor(KnownColor.DarkOliveGree n), 20, "Line1"));
    Add(new Line(Color.FromKnownColor(KnownColor.DarkOliveGree n), 90, "Line2"));
    Plots[0].Pen.Width = 2;
    Add("^NTCI", PeriodType.Day, 1);
    Add("^NNYH", PeriodType.Day, 1);
    Add("^NNYL", PeriodType.Day, 1);
    E = new DataSeries (this);
    H = new DataSeries (this);
    }

    Any help greatly appreciated, especially from whoever wrote the original as I don't understand why I'm not getting a plot on a chart !!

    Thanks;

    Ben.
    Last edited by stocktraderbmp; 09-21-2011, 07:27 AM.

    #2
    Hello Ben,

    Are you receiving any errors on the Log tab of the Control Center when loading this indicator?

    Who is your data provider?
    MatthewNinjaTrader Product Management

    Comment


      #3
      As above

      Hi Mathew,
      Thanks for coming back to me so quickly.

      My data is supplied by zenfire / broker is Mirus.

      Error as shown:

      21/09/2011 10:53:33,Default,The indicator 'JKHiLo' has called the Add() method with an invalid instrument. Either '^NNYL' does not exist in the Instrument Manager or the specified exchange has not been configured.,
      21/09/2011 10:53:33,Default,The indicator 'JKHiLo' has called the Add() method with an invalid instrument. Either '^NNYH' does not exist in the Instrument Manager or the specified exchange has not been configured.,
      21/09/2011 10:53:33,Default,The indicator 'JKHiLo' has called the Add() method with an invalid instrument. Either '^NTCI' does not exist in the Instrument Manager or the specified exchange has not been configured.,


      Didn't know script errors were posted in the log !! NNYL does not exist in my Instrument manager. How do I create it and configure the exchange? If I wanted to use data from the Russell say, were would I find the relevent nomenclature for the instrument. Will try "TF" in the meantime.

      Thanks again;

      Ben.

      Comment


        #4
        "TF" didn't work and it is in my instrument manager and Nybot is configured; unless it needs to be altered in the indicator!

        Tried "^RUT" as well.No luck so am obviously taking wild stabs in the dark here. Will wait now until I here from you !!

        Yeah right !! Maybe I'll keep trying, not in my nature to let it beat me! But hopefully you can put me out of my misery!
        Last edited by stocktraderbmp; 09-21-2011, 09:23 AM.

        Comment


          #5
          Originally posted by stocktraderbmp View Post
          "TF" didn't work and it is in my instrument manager and Nybot is configured; unless it needs to be altered in the indicator!
          You would need to specify the instrument front month in the script, "Add("TF 12-11", PeriodType.Day, 1);"

          Since you are using Zen-Fire, this will be futures data only. If you wanted Index data for the Russell, you could use the Kinetick End of day (Free) connection and add the ^RUT or ^SP500 for the S&P's.

          If you would like to use the preconfigured indexes in the script, please let me know and I can help you get these setup using the Kinetick connection.
          MatthewNinjaTrader Product Management

          Comment


            #6
            Thanks, I'll try that. It would be helpful to know how to add an instrument to the manager and configure an exchange. I'll go through it myself first and come back to you if I have issues. I'm sure this will be in the help file some where and I note there is a walk through in the "add instrument" section, will remember to get all the "symbol map" info before I start though. Thanks once again;

            Ben.

            Comment


              #7
              Please follow the instructions below to add an instrument in the Instrument Manager.
              • From the NinjaTrader Control Center window select the menu Tools > Instrument Manager
              • Press the "New" button
              • *Enter in instrument specific information and select the appropriate exchange (add Default exchange for equities in addition to the actual exchange)
              • Fill in any relevant information under the "Misc" tab such as symbol mapping for your target connectivty provider
              • Press the "OK" button

              * If you wish to add an equity, this can be accomplished without following the steps above. Just open a chart (for example) and start typing in the symbol and a new instrument is automatically created.
              The instrument is now added to the master instrument list. Please follow the instructions below if you want to add this instrument to an instrument list.
              • Select the instrument list you wish to add the instrument to via the "Instrument lists" drop down list in the upper left hand corner
              • Select the exchange (Default recommend for equities) as this will route orders to your broker smart routing system
              • Select the appropriate expiration date if this is a futures instrument
              • Press the "<" button to add the instrument to the list

              You are now complete and can press the "OK" button.
              MatthewNinjaTrader Product Management

              Comment


                #8
                Have altered script as you suggested and I now get a flat line so we are going forward. I am assuming as the math is referencing an index, it is looking for a number greater than 1 for new highs, lows etc. So a flat line should be expected from a reference of one instrument.
                Will try to test this on intra day data referencing the Russell through google / yahoo etc.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                580 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                336 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                103 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                554 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                552 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X