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

Unexpected trace error report

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

    Unexpected trace error report

    n/m -- i just found something I overlooked before.

    --EV
    Last edited by ETFVoyageur; 02-21-2014, 04:51 PM.

    #2
    I still have the problem. My indicator compiles fine, runs fine, and produces all of the correct values. As far as I can tell, everything is fine. Except that it does not plot and there is an unexpected error message in the trace log:
    2014-02-21 15:26:32:934 ERROR: Error on setting indicator plot for indicator 'RwbMomentum'. Value outside of valid range.
    Here is the relevant code:
    Code:
                value /= numPeriods;                            // % per bar, averaged for the configured periods
                value = Math.Pow((1+value), 252);                // Annualized percentage
                value -= 1;                                        // Fraction change per year
                value *= 100;                                    // % Change    per year
                IndicatorLine.Set(value);
    I have traced the problem to the call to Math.Pow(). The result is 24.xxx, confirmed by my TI calculator. I have also put in code to catch Nan, PositiveInfinity, and NegativeInfinity -- no such thing happens.

    It is not the call per se, because if I reduce the power a lot, such as to 21, the problem goes away.

    I am stymied -- any help with what the problem could be, or with how to further diagnose the problem, would be appreciated. I hope I am not too embarrassed when someone points out what I am overlooking

    Thanks,
    EV
    Last edited by ETFVoyageur; 02-21-2014, 05:42 PM.

    Comment


      #3
      What is the upper limit of indicator value that NT will plot?

      I found my problem. There was one pretty high value buried in the trace. I now cap the values that can be generated and it plots fine.

      I really think that the trace message ought to mention what the maximum value is. That would be very helpful in a situation like this one.

      Better yet, NT should just cap its plot if it needs to. That would leave the dataseries intact for other uses.

      --EV

      Comment


        #4
        Hello EV,

        Thank you for posting and updating.

        I'm not sure the exact limit that can plotted as I have gotten very high up there as well.

        However, anytime you receive that message there is one of two possibilities, either it returned as a N/A number or the value is really high.
        Cal H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by andrewtrades, Today, 04:57 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by chbruno, Today, 04:10 PM
        0 responses
        6 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by josh18955, 03-25-2023, 11:16 AM
        6 responses
        436 views
        0 likes
        Last Post Delerium  
        Started by FAQtrader, Today, 03:35 PM
        0 responses
        9 views
        0 likes
        Last Post FAQtrader  
        Started by rocketman7, Today, 09:41 AM
        5 responses
        20 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X