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 CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      53 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      34 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      100 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      181 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      170 views
      0 likes
      Last Post CarlTrading  
      Working...
      X