Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

DrawOnPricePanel not working anymore ?

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

    DrawOnPricePanel not working anymore ?

    I had an indicator which was working fine with previous Ninja version (6.5.1000.10). It is exact as the VOL indicator but places a transparent horizontal line on volume panel to set a fixed scale using DrawOnPricePanel to draw it on the panel. But with last version it doesnt work anymore.....(it draws everything on price panel)

    protected override void OnBarUpdate()
    {
    if (CurrentBar==0)
    {
    DrawOnPricePanel = false;
    DrawHorizontalLine("X",true,MaxLevel, Color.Transparent ,DashStyle.Solid ,1 );

    Any ideas . . . ?
    pmaglio
    NinjaTrader Ecosystem Vendor - The Indicator Store

    #2
    You should set DrawOnPricePanel in Initialize().
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Josh View Post
      You should set DrawOnPricePanel in Initialize().

      It was there initially, but I placed everywere just to see what happens without results.....lol
      pmaglio
      NinjaTrader Ecosystem Vendor - The Indicator Store

      Comment


        #4
        Any errors while in Initialize()? Have you removed the indicator and added a new instance to the chart?
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Josh View Post
          Any errors while in Initialize()? Have you removed the indicator and added a new instance to the chart?
          No, I dont have errors.
          pmaglio
          NinjaTrader Ecosystem Vendor - The Indicator Store

          Comment


            #6
            You will have to debug it then. Try a simple indicator to see if that works. Remember you need to be applying new instances of your indicator when you make these changes.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Josh View Post
              You will have to debug it then. Try a simple indicator to see if that works. Remember you need to be applying new instances of your indicator when you make these changes.
              It is just an old indicator which worked fine on all my PC's with previous Ninja version, and now with last Ninja version the DrawOnPricePanel value is ignored....
              pmaglio
              NinjaTrader Ecosystem Vendor - The Indicator Store

              Comment


                #8
                As stated, you will need to debug your NT and first see if DrawOnPricePanel works for you at all. To do this you need to create a very simple indicator that just draws something and set DrawOnPricePanel in the Initialize() method.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by NinjaTrader_Josh View Post
                  As stated, you will need to debug your NT and first see if DrawOnPricePanel works for you at all. To do this you need to create a very simple indicator that just draws something and set DrawOnPricePanel in the Initialize() method.
                  It doesnt work, just added 3 lines on standard vol indicator and it places the horizontal line on price panel;
                  ///<summary>
                  /// Volume is simply the number of shares (or contracts) traded during a specified time frame (e.g. hour, day, week, month, etc).
                  ///</summary>
                  [Description("Volume is simply the number of shares (or contracts) traded during a specified time frame (e.g. hour, day, week, month, etc).")]
                  public class VOL_modified : Indicator
                  {
                  ///<summary>
                  /// This method is used to configure the indicator and is called once before any bar data is loaded.
                  ///</summary>
                  protected override void Initialize()
                  {
                  Add(new Plot(new Pen(Color.Blue, 2), PlotStyle.Bar, "Volume"));
                  Add(new Line(Color.DarkGray, 0, "Zero line"));
                  DrawOnPricePanel = false;
                  }
                  ///<summary>
                  /// Called on each bar update event (incoming tick)
                  ///</summary>
                  protected override void OnBarUpdate()
                  {
                  Value.Set(Volume[0]);
                  if (CurrentBar==0)
                  DrawHorizontalLine("X",true,2222, Color.Yellow ,DashStyle.Solid ,1 );
                   
                  }
                  }
                  pmaglio
                  NinjaTrader Ecosystem Vendor - The Indicator Store

                  Comment


                    #10
                    Works fine here. Please try a clean reinstall of your NT.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #11
                      Originally posted by NinjaTrader_Josh View Post
                      Works fine here. Please try a clean reinstall of your NT.
                      I solved the issue, uninstalling Ninja, DELETING Ninja Folder in "My Documents" and reinstalling again....
                      I have no idea what happened on all my Pc's ( even on my backup PC which I was not using a long time)...

                      Thanks Josh
                      pmaglio
                      NinjaTrader Ecosystem Vendor - The Indicator Store

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by mattbsea, Today, 05:44 PM
                      0 responses
                      3 views
                      0 likes
                      Last Post mattbsea  
                      Started by RideMe, 04-07-2024, 04:54 PM
                      6 responses
                      31 views
                      0 likes
                      Last Post RideMe
                      by RideMe
                       
                      Started by tkaboris, Today, 05:13 PM
                      0 responses
                      2 views
                      0 likes
                      Last Post tkaboris  
                      Started by GussJ, 03-04-2020, 03:11 PM
                      16 responses
                      3,282 views
                      0 likes
                      Last Post Leafcutter  
                      Started by WHICKED, Today, 12:45 PM
                      2 responses
                      20 views
                      0 likes
                      Last Post WHICKED
                      by WHICKED
                       
                      Working...
                      X