Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plot Puzzle

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

    Plot Puzzle

    Hi,

    I just developed a simple MTF indicator: on a 5 minute chart I plot the 5 minutes 20 bars EMA plus the 15 minutes 20 bars EMA and, finally, the 60 minutes 20 bars EMA.

    The two latter EMAs plot in a step wise fashion, but the 20 bars EMA on the primary data series does not and it appears to be continuous, though, strictly speaking, it shouldn't since the granularity of the candles is discrete.

    How should I proceed in order to smooth also the EMAs on the other two time frames?

    I attach a screenshot and the source code of my indicator.

    Best regards,

    Gianpiero
    Attached Files

    #2
    Gianpiero,

    Thank you for your note.

    This is because the .Set() will generate a value for each bar and why it appears in the step fashion.

    You would need to create a data series synced to a different time frame than the primary and you would have to do some custom plotting for this to show in a more smoothed matter on the chart -
    http://www.ninjatrader.com/support/f...ead.php?t=3572

    For the custom plotting take a look at the CustomPlotSample from Tools -> Edit NinjaScript -> Indicator
    Cal H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    83 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    45 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    65 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    68 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    56 views
    0 likes
    Last Post CarlTrading  
    Working...
    X