Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

EMA Charting

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

    EMA Charting

    Hi, I can't seem to be able to write a code for strategy to simply show EMA 200 indicator on my chart, can you please help, attached is my code and I keep getting error "The type or namespace name 'Color' does not exist in the namespace 'System.Drawing' (are you missing an assembly reference?)" and I do have System.Drawing up on my code. Can you provide a simpler code just to show EMA 200 on chart or help to fix my code please? See attached.
    Attached Files

    #2
    Hello shahabjet1,

    Thanks for your post.

    If you are wanting to plot the EMA(200) on a chart, the AddPlot() method should be added to the script which will add a plot to the chart. The EMA(200)[0] value could then be assigned to that plot so that the script plots the EMA(200) on the chart when you add the indicator to the chart.

    I have attached a simple example script demonstrating how this could be accomplished.

    Note that NinjaTrader 8 uses Brushes to define the color of an object. For example, Brushes.Red would be used to set a plot or drawing to the color red.

    See the help guide documentation below for more information.

    AddPlot(): https://ninjatrader.com/support/help...t8/addplot.htm
    EMA(): https://ninjatrader.com/support/help...onential_e.htm
    Working with Brushes: https://ninjatrader.com/support/help...th_brushes.htm

    Please let me know if I may assist you further on this topic.
    Attached Files
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    66 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    141 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    75 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    46 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    51 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X