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

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 JonesJoker, 04-22-2024, 12:23 PM
    8 responses
    41 views
    0 likes
    Last Post JonesJoker  
    Started by timko, Today, 06:45 AM
    0 responses
    3 views
    0 likes
    Last Post timko
    by timko
     
    Started by Waxavi, 04-19-2024, 02:10 AM
    2 responses
    39 views
    0 likes
    Last Post poeds
    by poeds
     
    Started by chbruno, Yesterday, 04:10 PM
    1 response
    44 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by Max238, Today, 01:28 AM
    1 response
    25 views
    0 likes
    Last Post CactusMan  
    Working...
    X