Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Wandering Values

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

    Wandering Values

    NT Support and Community,
    I need some insight. I have an indicator that uses the following code:

    dperiod = HomodyneDiscriminator(Close)[0];
    dperiod = Math.Round(dperiod);
    period = (
    int)dperiod;
    double newvalue = EhlersSuperSmoother(Close,ssalpha)[0];
    newvalue = newvalue/1000.0;//dividing to give transform smaller numbers to digest
    Plotit.Set(newvalue);
    Fishmod.Set(FisherTransform(Plotit,period)[
    0]);

    I plot the Fishmod on the chart, it works fine, a good indicator. When I use the same lines of code in a strategy the values differ. Using print statements I see that the period and Plotit values are the same between the indicator and strategy. The Fishmod values start off close and then get more askew as the strategy runs. Any ideas what to look for?

    Mike

    #2
    Hello,

    Just wanted to let you know we recieved your note and someone will answer shortly.

    Thank you for your patience.
    BrettNinjaTrader Product Management

    Comment


      #3
      Wandering Values: The Plot Thickens

      NT Brett,
      Thanks for the response.
      Since then I ran the strategy on the Strategy Analyzer and put the indicator on. According to the Output window the values on the chart and the values sent by the print statements were in agreement. So now I am further baffled. They agree in backtest but not in realtime. Again any help from you or the community will be appreciated.
      Mike

      Comment


        #4
        Hello,

        In the reference indicator please be sure to remove the CalculateOnBarClose settings, the minimum bars required settings as these could create issues when you run the strategy. Also make sure that you have the same data loaded, would recommend building a chart with as many days back so that you download fresh data from the historical data server and then try again and let me know.

        Also, Is this a multi-series strategy?
        BrettNinjaTrader Product Management

        Comment


          #5
          Wandering Continued

          Brett,
          Thanks for getting back to me.
          By multiseries I presume you mean multiple indicators. I am using the Trix indicator and the Fisher Transform which I modified as per my first post. I commented out the CalculateOnBarClose form the indicator but not the strategy.No change. I noticed that on the first bar that closes in real time that Fishmod[1] is correct and that Fishmod[0] is incorrect and that all subsequent calculations are incorrect. Which says as soon as it goes to realtime the Fishmod calculation goes awry. The Trix is always correct. Below is how I call the series in to take an order.
          // Condition set for first trade of day long
          if (TrixModified(Close,1,21,3).Signal[0] > TrixModified(Close,1,21,3).Signal[1]
          && Fishmod[
          0] > Fishmod[1]&& Fishmod[0]<-3
          && Position.MarketPosition == MarketPosition.Flat && eitherdirection==true && earlyexit==false && period>=18)
          {
          GoLong();

          Also, I do not use the Add() method to put the indicators on the chart through the strategy, I add them directly to the chart via the indicators window.
          Thanks for your efforts.
          Mike

          Comment


            #6
            BigMike,

            Did you comment out CalculateOnBarClose from all indicators the strategy uses? Included the Trix?

            Also, are you on Beta .14, there may be a related bug the could affect this. If you are on beta .14 please upgrade to the latest beta .15.

            If this still does not resolve you issue I would need to take a look at your code. In which case you can send as an attachment to support at ninjatrader dot com and put ATTN: Brett and reference this forum post.
            BrettNinjaTrader Product Management

            Comment


              #7
              Found the key

              Brett,
              I have done some experimenting and narrowed the problem down to the period variable used in the Fishmod calculation. If I set that to a fixed value in both indicator and strategy they sync up and work okay. So that leads me to my next 2 questions, Why get two different outputs in realtime from the Fisher Transform when the period is the same ? How can I keep the adaptive functionality in them, Is there a better way?
              Thanks
              Mike

              Comment


                #8
                What NinjaTrader version are you running? This is found in the Control Center->Help->About and is to the right of the NinjaTrader Logo.
                BrettNinjaTrader Product Management

                Comment


                  #9
                  Spoke to soon

                  An update from last post, It took 15 bars of data for the values to differ using a fixed period. it was 1 bar with thw adaptive period.
                  Back to square one.




                  Mike

                  Comment


                    #10
                    Mike,

                    Need to know what version you are running when you get a chance.

                    Thank You.
                    BrettNinjaTrader Product Management

                    Comment


                      #11
                      Version

                      Brett,
                      I am running 6.5.10000.14

                      If it is any helpthe wayward Fisher value seems to eventually go to -7.6 and stays there.

                      Mike

                      Comment


                        #12
                        By the way

                        Big Mike,

                        Ehlers in a presentation in 2006 said "I no longer recommend Frequency Discriminators".
                        I think that group includes the HomodyneDiscriminator that you are using to try to get the period.

                        Comment


                          #13
                          Can you please upgrade to the latest NinjaTrader release version 6.5.1000.15 and see if the issue persists.

                          Please download the latest version of NinjaTrader Here:


                          Make sure to close NinjaTrader before you install the updated version of NinjaTrader, all of your settings will be maintained.
                          BrettNinjaTrader Product Management

                          Comment


                            #14
                            UpGrade Problem

                            Brett,
                            When I upgraded the Software it Flagged an error twice while trying to compile the indicators and Strategies and loaded the default set. My stuff is not listed in the indicator or strategy windows but is still on the computer in the same Directory. How do I get them back in to continue.

                            Mike

                            Comment


                              #15
                              What errors are you getting when you try and compile. It is best to take a screenshot of the errors so that I may further assist.

                              To send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CRTL + V to paste the image. Lastly, save as a jpeg file and attach the file as an attachment.
                              BrettNinjaTrader Product Management

                              Comment

                              Latest Posts

                              Collapse

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