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 kinfxhk, 07-13-2026, 10:18 AM
      0 responses
      30 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 09:50 AM
      0 responses
      24 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 07:21 AM
      0 responses
      30 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-11-2026, 02:11 AM
      0 responses
      27 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by SalmaTrader, 07-07-2026, 10:26 PM
      0 responses
      141 views
      0 likes
      Last Post SalmaTrader  
      Working...
      X