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 Mindset, 04-21-2026, 06:46 AM
        0 responses
        54 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        72 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        38 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        99 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        60 views
        0 likes
        Last Post PaulMohn  
        Working...
        X