Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

got this far ... how do I plot this?

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

    got this far ... how do I plot this?

    Help .. I bet its obvious, but obviously not for me..

    So I did manage to get my calculations from the data but I cant figure how to plot a double value that I ended up with:

    protectedoverridevoid Initialize()
    //...... other stuff ...
    double _sUM_diff = (_sUM_diff12 - _sUM_diff7);

    //Getting method name errors when this is tried
    Add(new Plot(Color.Orange, "_sUM_diff"));

    //and also tried variations of this with errors in 'variables' and 'method'
    //from the NT6.5 help files
    Add(_sUM_diff);


    ------------------------------------------------------------------
    Obviously I am not seeing what I should.

    Any input is appreciated,
    Jon

    #2
    Hi Trader.Jon,

    Is this in an indicator or strategy?

    You need to "set" the plot, and use the appropriate code in the Properties section as well.
    Here's an example of "set" plot - http://www.ninjatrader-support.com/H...culationLogic1

    You can use the wizard to create plots and see how it done as well - "Tools>New NS>Indicator"
    TimNinjaTrader Customer Service

    Comment


      #3
      Tim,

      This is within a strategy ... sorry to not make that clear.

      I looked at the indicator wizard and was totally lost ...

      Jon

      Comment


        #4
        Hi Trader.Jon,

        Have you review this sample?
        When running a strategy on a chart you may find the need to plot values onto a chart. If these values are internal strategy calculations that are difficult to migrate to an indicator, you can use the following technique to achieve a plot. NinjaTrader 8 With NinjaTrader 8 we introduced strategy plots which provide the ability
        TimNinjaTrader Customer Service

        Comment


          #5
          Tim,

          As stated .. I am trying to plot a 'double' generated within a strategy

          I tried that sample:
          When running a strategy on a chart you may find the need to plot values onto a chart. If these values are internal strategy calculations that are difficult to migrate to an indicator, you can use the following technique to achieve a plot. NinjaTrader 8 With NinjaTrader 8 we introduced strategy plots which provide the ability


          This is how I interpret that sample using the code I have to plot:
          protected override void Initialize()

          Add(_sUM_diff(0));
          _sUM_diff(0).Plots[0].Pen.Color = Color.Blue;
          _sUM_diff(0).PanelUI = 1;
          _sUM_diff(0).Value.Set[0]);



          protected override void OnBarUpdate()
          _sUM_diff(0).Value.Set[0];


          Getting all kinds of compile errors: what am I missing here?
          Jon
          Last edited by Trader.Jon; 07-13-2010, 06:32 PM.

          Comment


            #6
            Trader.Jon the sample Tim pointed you to use 2 'dummy' indicators to achieve a plot from the strategy (which would normally not offer plotting options) - have you imported those indicators provided as well? Likely those are missing and thus you would see the compile errors.

            Comment

            Latest Posts

            Collapse

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