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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      161 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      308 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      245 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      349 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      179 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X