Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adding a plot on the chart in the strategy initialize()

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

    Adding a plot on the chart in the strategy initialize()

    I've tried lots of different methods but haven't come across a solution that compiles yet.

    I guess it must be really simple.

    In my strategy I am adding plots of the important moving averages, and by default they all appear beige or brown or similiar, not sure which color that is.

    I would like to set them myself. I tried this for instance but no joy:

    Code:
    [FONT=Courier New]Plot oneMA = EMA(longLen);
    oneMA.Pen.Color = Colors.Blue;
    Add(oneMA);[/FONT]
    but this doesn't compile. Can anyone help?

    Thanks v much

    #2
    adamus,

    You cannot just create a Plot into a strategy. Strategies do not have a concept of what a plot is like indicators do. To plot from a strategy please see this reference sample: http://www.ninjatrader-support2.com/...ead.php?t=6651

    To change the color, please see the tips here: http://www.ninjatrader-support2.com/...ead.php?t=3228
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks v. much

      Comment

      Latest Posts

      Collapse

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