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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        81 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        42 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        64 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        68 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        55 views
        0 likes
        Last Post CarlTrading  
        Working...
        X