• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Not calculating indicator for last bar painted

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

    Not calculating indicator for last bar painted

    I am using a simple crossover system, and have for example inside OBU:

    Code:
    if (CurrentBar<emalenlow)
                     return;
    
    emalow[0]= EMA(Low, emalenlow)[0];
    In the SetDefaults I am using:
    Code:
        AddPlot(Brushes.Red, "emalow");
    And in #region Properties, have:
    Code:
    [Browsable(false)]
            [XmlIgnore]
            public Series<double> emalow
            {
                get { return Values[0]; }
            }
    But on the chart there is no ema value on the last bar drawn, only up to the second last bar. Is there something I need to modify?

    #2
    Hello pel11,

    Thank you for the post.

    What is your CalculationMode currently set to? If you are using OnBarClose, the building bar is not included because it is not yet closed. Using OnEachTick or OnPriceChange would allow the Building bar to be used.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      RESOLVED - Thanks - I noticed that by changing the settings. Good to go. Thx

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by zulok, Today, 12:54 PM
      1 response
      2 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by RadarTradar, 01-04-2020, 10:02 AM
      12 responses
      129 views
      0 likes
      Last Post Eric M.
      by Eric M.
       
      Started by KINGKODA, Today, 12:08 PM
      0 responses
      10 views
      0 likes
      Last Post KINGKODA  
      Started by [email protected], Today, 10:54 AM
      3 responses
      18 views
      0 likes
      Last Post NinjaTrader_ShawnB  
      Started by wbennettjr, Today, 11:18 AM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_ChrisL  
      Working...
      X