Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Not always getting Fisher Values correctly

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

    Not always getting Fisher Values correctly

    I'm using Market Replay data with version 6.5.


    When printing the current fisher transform values:

    Print ("35 Period: " + FisherTransform(35)[0]);
    Print ("5 Period: " + FisherTransform(5)[0]);

    To the output window. It doesn't always correlate with what is seen in the chart. Sometimes it is off by a great deal.

    Can anyone offer an explanation for that?
    Attached Files
    Last edited by lookOutBelow; 08-02-2010, 12:18 PM.

    #2
    Hi lookOutBelow,

    What provider are you connected to?
    What instrument and interval are you testing this on?
    Can you provide a bar stamp day and time (as well as your time zone) of the incorrect values, so that I can test this on my end?
    TimNinjaTrader Customer Service

    Comment


      #3
      Tim,

      Thanks for the reply. My provider is Zenfire. I'm doing this with ES on a 1-min chart.

      Here are two new images with a time stamp in the output. I'm in the Pacific Time Zone. I've tested on other dates I have Market Replay data saved for, and the same problem exists. Most of the day, it seems to be correct. But it is off enough to cause havoc with errant trades triggered by incorrect values.

      Thanks,
      Rick
      Attached Files

      Comment


        #4
        Hi lookOutBelow,

        Do you have historical data that far back, to test on a chart outside of Market Replay?
        Would you mind printing the price data along with that and test as well.
        TimNinjaTrader Customer Service

        Comment


          #5
          I'm rather new to NT and have yet to even do any sort of Historical stuff. And I'm not sure I exactly know what you are asking for?? I can connect to ZenFire and look at the charts from 7/20. ?

          And, assuming I do have that data. How do you want me to print that price? To the output window?





          Originally posted by NinjaTrader_Tim View Post
          Hi lookOutBelow,

          Do you have historical data that far back, to test on a chart outside of Market Replay?
          Would you mind printing the price data along with that and test as well.

          Comment


            #6
            Okay, I found how to do back testing on historical. Looks like I have data from that time period. Let me figure this out and get back to you.

            Thanks

            Comment


              #7
              Tim,

              Is this what you are looking for? This is a partial output from a historical run on 7/20

              Rick
              Attached Files

              Comment


                #8
                Hi lookOutBelow,

                Yes, by that I mean data on a chart while connected to your provider, not the data used for Market Replay.

                Can you try printing the price, and compare, you can do this with...
                Print(Close[0]);

                So that we ensure we're looking at the right value.
                TimNinjaTrader Customer Service

                Comment


                  #9
                  Attached you will find the Market Replay results and the Historical results.

                  For some reason the historical data starts at 6:51am PST. I have no idea why.

                  I couldn't include the whole day's data because there is a limitation on the size of TXT files I can upload to this forum..
                  Attached Files

                  Comment


                    #10
                    lookOutBelow, are you using the appropriate settings for the actual Fisher indicator? This is the first report I've heard of these values not being correct. Is the complete code you're using posted above? If so, please consider adding some additional information to help pin-point what could be going wrong. For example, you can print out the bar number above each bar to see which bar has what value. Please try the attached script. The only input is the period of the Fisher Transform. Everything looks correct here.
                    Attached Files
                    AustinNinjaTrader Customer Service

                    Comment


                      #11
                      I cannot load that version. I am using 6.5...

                      Can you send it to me again or just the text itself?

                      Comment


                        #12
                        My apologies, here is the 6.5 version.
                        Attached Files
                        AustinNinjaTrader Customer Service

                        Comment


                          #13
                          Here is the complete code to what is not working....

                          Code:
                          #region Using declarations
                          using System;
                          using System.ComponentModel;
                          using System.Diagnostics;
                          using System.Drawing;
                          using System.Drawing.Drawing2D;
                          using System.Xml.Serialization;
                          using NinjaTrader.Cbi;
                          using NinjaTrader.Data;
                          using NinjaTrader.Indicator;
                          using NinjaTrader.Gui.Chart;
                          using NinjaTrader.Strategy;
                          #endregion
                          
                          // This namespace holds all strategies and is required. Do not change it.
                          namespace NinjaTrader.Strategy
                          {
                              /// <summary>
                              /// Enter the description of your strategy here
                              /// </summary>
                              [Description("Enter the description of your strategy here")]
                              public class FischerTest : Strategy
                              {
                                  #region Variables
                                  // Wizard generated variables
                                  private int myInput0 = 1; // Default setting for MyInput0
                                  // User defined variables (add any user defined variables below)
                                  #endregion
                          
                                  /// <summary>
                                  /// This method is used to configure the strategy and is called once before any strategy method is called.
                                  /// </summary>
                                  protected override void Initialize()
                                  {
                          
                                      CalculateOnBarClose = false;
                                  }
                          
                                  /// <summary>
                                  /// Called on each bar update event (incoming tick)
                                  /// </summary>
                                  protected override void OnBarUpdate()
                                  {
                                      
                                      
                                          if (Historical)
                                            return;
                                          
                                      Print (""); Print (""); 
                                      Print(Time[0]);
                                      Print ("Close Price:  " + Close[0]);
                                      Print ("5 Period: " + FisherTransform(5)[0]);
                                      Print ("35 Period: " + FisherTransform(35)[0]);
                                      Print ("-------------------END----------");
                                          
                                          
                              
                                  }
                          
                                  #region Properties
                                  [Description("")]
                                  [Category("Parameters")]
                                  public int MyInput0
                                  {
                                      get { return myInput0; }
                                      set { myInput0 = Math.Max(1, value); }
                                  }
                                  #endregion
                              }
                          }

                          Comment


                            #14
                            lookOutBelow, I was unable to reproduce the mis-matched values. Please try with my attached script and let us know if the results are the same. It is necessary to make sure we are working with the bare minimums to ensure nothing is complicating the results.
                            AustinNinjaTrader Customer Service

                            Comment


                              #15
                              I figured out the problem.


                              It seems that if you run this strategy under the Strategy Tab, instead of loading the strat in the chart, it gives incorrect results.

                              As soon as I loaded it into the chart, it worked as it should.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Balage0922, Today, 07:38 AM
                              0 responses
                              3 views
                              0 likes
                              Last Post Balage0922  
                              Started by JoMoon2024, Today, 06:56 AM
                              0 responses
                              6 views
                              0 likes
                              Last Post JoMoon2024  
                              Started by Haiasi, 04-25-2024, 06:53 PM
                              2 responses
                              19 views
                              0 likes
                              Last Post Massinisa  
                              Started by Creamers, Today, 05:32 AM
                              0 responses
                              6 views
                              0 likes
                              Last Post Creamers  
                              Started by Segwin, 05-07-2018, 02:15 PM
                              12 responses
                              1,786 views
                              0 likes
                              Last Post Leafcutter  
                              Working...
                              X