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

can't get it to plot

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

    can't get it to plot

    i really am at a loss...
    i just can't see what i've missed...
    i just used the packaged EMA indicator to build one with a crossing signal
    and i can't even get the thing to plot
    this is probably the most simple indicator mod i've done - besides the color changing hull
    ... what is wrong here ?

    thank God it's Fed day tomorrow - the mrkts will be slow...
    Attached Files
    Last edited by stafe; 06-17-2014, 11:15 PM.

    #2
    For the first bar of your chart, which is CurrentBar = 0, you are referencing the prior bar Close[1] and the prior indicator value Value[1], although such values do not exist.

    All you need to do is to insert

    Code:
    if(CurrentBar < 1)
         return;
    in line 58 of your indicator.

    Comment


      #3
      omg, i do feel really stupid now
      i even checked the Log and of course there was the "out of range" error in bright yellow
      thanks Harry
      i put down programing in 1982 and just picked it back up two years ago with C#
      got all this rust all over me...

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Conceptzx, 10-11-2022, 06:38 AM
      3 responses
      60 views
      0 likes
      Last Post NinjaTrader_SeanH  
      Started by f.saeidi, Today, 01:32 PM
      1 response
      2 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by mmckinnm, Today, 01:34 PM
      0 responses
      3 views
      0 likes
      Last Post mmckinnm  
      Started by traderqz, Today, 12:06 AM
      9 responses
      16 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by kevinenergy, 02-17-2023, 12:42 PM
      117 responses
      2,766 views
      1 like
      Last Post jculp
      by jculp
       
      Working...
      X