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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        73 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        152 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        162 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        100 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        288 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X