Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

EMA from higher timeframe not plotting

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

    EMA from higher timeframe not plotting

    I wrote a simple indicator to plot a 10 EMA from the primary data series (5 minute in this example), and also from the 15 minute data series. I've looked at a ton of examples here to plot the EMAs from the correct data series, but for whatever reason, the 15 minute values won't plot. The 15 minute values are being calculated correctly, and I show that by drawing dots at the values where the plotting code is being executed.

    What can I do to get the 15 minute plot line to also display?

    Thanks in advance.​
    Attached Files

    #2
    Hello furman87,

    Thank you for your post.

    Do you receive any error messages in the Log tab of the Control Center?

    Are you passing in the correct BarsArray index into the SMA and assigning this value to your plot for the 15 minute SMA?



    Please see the attached sample script which demonstrates.
    Attached Files

    Comment


      #3
      Thanks for your reply, your example does plot both values, but it plots the 15 minute average like stair-steps instead of a smooth curve. I was only assigning the 15 minute plot values when the that data series was active, which might be why the plot doesn't display.

      if (BarsInProgress == 1)
      {
      Plot2[0] = ema2[0];
      Draw.Dot(this, $"dot-{CurrentBar}", false, 0, Plot2[0], Brushes.Blue);
      }


      Is there a way to plot the higher timeframe line smoother, like it does for all other line plots?

      Comment


        #4
        Hello furman87,

        Thank you for your response.

        Since you are plotting a primary series that updates faster than secondary series, this stair stepping would be expected. The secondary series values will be the same while the primary bars change, so you will get flat line creating the stair step effect.

        You could smooth the curve by offsetting the values but then it will be fake data.

        Please let us know if you have any further questions.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        598 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        343 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        556 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        555 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X