Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT7 to NT8 errors

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

    NT7 to NT8 errors

    I´am getting some errors when converting nt7 to nt8 indicators:

    Plots[0].Pen.Width = 2;

    This is giving me the following error:

    ´system.windows.media.pen´does not contain a definition for Width accepting a first argument of type ´system.windows.media.pen´could be found (are you missing a using directive or an assembly reference?

    Then next error:

    Draw.Region(this,"StdErrorSmooth1", CurrentBar, 0, Lower2, Lower, Brushes.Empty, LowerColor, OpacityOuter);
    Draw.Region(this,"StdErrorSmooth2", CurrentBar, 0, Lower, Upper, Brushes.Empty, MiddleColor, OpacityMiddle);
    Draw.Region(this,"StdErrorSmooth3", CurrentBar, 0, Upper, Upper2, Brushes.Empty, UpperColor, OpacityOuter);

    Giving the following error:
    System.windows.media.brushes´does not contain a defenition for ´empty´

    What do I have to change?

    Thanks

    #2
    Hello tpotrades,

    Thanks for your post.

    For the width, you can use Plots[0].Width = 2;

    For an empty color, use Brushes.Transparent;

    Comment


      #3
      Thanks....

      I have a few more errors:

      The type or namespace name ´Periode´could not be found (are you missing a using directive or an assembly reference?)

      public override PropertyDescriptorCollection GetProperties(PropertyDescriptor propertyDescriptor, Period period, Attribute[] attributes)

      public override string ToString(Period period)

      public override int GetInitialLookBackDays(Period period, int barsBack)



      And:

      The type or namespace name ´barsdata´ does not exist in the namespace ´ninjatrader.gui.chart´(are you missing an assembly reference?)

      public override void ApplyDefaults(Gui.Chart.BarsData barsData)





      Thanks...
      Last edited by tpotrades; 05-30-2017, 11:35 AM.

      Comment


        #4
        Hello tpotrades,

        Thanks for your reply.

        It would be best if you reviewed the NT8 helpguide. Here are two relevant links

        Property descriptor: http://ninjatrader.com/support/helpG...econverter.htm

        For the defaults, there are a number of properties here: http://ninjatrader.com/support/helpG...?chartbars.htm

        In general, for an overview and specific property/methods you will want to start with the code breaking changes identified here: http://ninjatrader.com/support/helpG...ng_changes.htm

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        576 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
        553 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