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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      77 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X