Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

want to plot Custom Candle

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

    want to plot Custom Candle

    I want to plot candle or with different Colors which has cumulative delta vaule >+20000 or >-20000 and It should have volume >100000.

    Is this can be done ? From Where I should Start ?

    #2
    Hello svadukia,

    Thanks for the post.

    Please see the attached example script that sets up a CumulativeDelta indicator at the class level and then gets data from that indicator in OnBarUpdate. I also demonstrate how to get Volume data.

    To change the color of a bar based on a condition, you can use BarBrushes to change the color at a specified bar index.


    Below is the documentation page on the Orderflow Cumulative Delta indicator:


    Please let us know if we may be of any further assistance.
    Attached Files

    Comment


      #3
      Originally posted by NinjaTrader_ChrisL View Post
      Hello svadukia,

      Thanks for the post.

      Please see the attached example script that sets up a CumulativeDelta indicator at the class level and then gets data from that indicator in OnBarUpdate. I also demonstrate how to get Volume data.

      To change the color of a bar based on a condition, you can use BarBrushes to change the color at a specified bar index.


      Below is the documentation page on the Orderflow Cumulative Delta indicator:


      Please let us know if we may be of any further assistance.


      protected override void OnBarUpdate()
      {
      if(CurrentBars[0] < 1) return;

      if(BarsInProgress == 0)
      {
      Print(Volume[0] +" Volume");
      Print(MyCD.DeltaClose[0] + " DClose");
      Print(MyCD.DeltaOpen[0] + " DOpen");
      Print(MyCD.DeltaHigh[0] + " DHigh");
      Print(MyCD.DeltaLow[0] + " DLow");
      }
      }

      So I need to plot my condition in this box right ??
      here it is my code

      protected override void OnBarUpdate()
      {
      if(CurrentBars[0] < 1) return;

      if(BarsInProgress == 0)
      {

      if ( (MyCD.DeltaHigh[0] - MyCDdeltaLow) >= 20000) && Volume[0] >
      100000)
      BarBrushes[0] = Brushes.Brown ;
      CandleOutlineBrushes[0] = Brushes.Brown;


      }
      }


      Is this right ??

      Comment


        #4
        Originally posted by svadukia View Post
        protected override void OnBarUpdate()
        {
        if(CurrentBars[0] < 1) return;

        if(BarsInProgress == 0)
        {
        Print(Volume[0] +" Volume");
        Print(MyCD.DeltaClose[0] + " DClose");
        Print(MyCD.DeltaOpen[0] + " DOpen");
        Print(MyCD.DeltaHigh[0] + " DHigh");
        Print(MyCD.DeltaLow[0] + " DLow");
        }
        }

        So I need to plot my condition in this box right ??
        here it is my code

        protected override void OnBarUpdate()
        {
        if(CurrentBars[0] < 1) return;

        if(BarsInProgress == 0)
        {

        if ( (MyCD.DeltaHigh[0] - MyCDdeltaLow) >= 20000) && Volume[0] >
        100000)
        BarBrushes[0] = Brushes.Brown ;
        CandleOutlineBrushes[0] = Brushes.Brown;


        }
        }


        Is this right ??
        Tried that code but getting an error as shown in the attached picture in another line of code...
        Attached Files

        Comment


          #5
          Hello svadukia,

          Thanks for the reply.

          Did you define MyCD like so? :

          Code:
          public class Test : Indicator
          	{
          		
          		private OrderFlowCumulativeDelta MyCD;
                  ...
          I look forward to your reply.

          Comment


            #6
            Originally posted by NinjaTrader_ChrisL View Post
            Hello svadukia,

            Thanks for the reply.

            Did you define MyCD like so? :

            Code:
            public class Test : Indicator
            	{
            		
            		private OrderFlowCumulativeDelta MyCD;
                    ...
            I look forward to your reply.
            Yes Define same that way.. all things are same as u gave in zip file...

            Comment


              #7
              Hello svadukia,

              Thanks for the reply.

              The release notes here say that the signature for DeltaType was changed in revision 13.1.



              Please make sure you are on revision 8.0.13.1 by going to Help> About.

              If you are not, please update your installation with these steps:
              1. First, copy your license key from NinjaTrader under Help> License Key then exit NinjaTrader
              2. Click on the link: http://ninjatrader.com/PlatformDirect
              3. Enter your license key and press Submit
              4. Select 'NinjaTrader 8'
              5. Select 'Download'
              6. Critical: Before running the installer, ensure NinjaTrader is closed.
              7. Run the installer.


              I look forward to hearing of your results.

              Comment


                #8
                Originally posted by NinjaTrader_ChrisL View Post
                Hello svadukia,

                Thanks for the reply.

                The release notes here say that the signature for DeltaType was changed in revision 13.1.



                Please make sure you are on revision 8.0.13.1 by going to Help> About.

                If you are not, please update your installation with these steps:
                1. First, copy your license key from NinjaTrader under Help> License Key then exit NinjaTrader
                2. Click on the link: http://ninjatrader.com/PlatformDirect
                3. Enter your license key and press Submit
                4. Select 'NinjaTrader 8'
                5. Select 'Download'
                6. Critical: Before running the installer, ensure NinjaTrader is closed.
                7. Run the installer.


                I look forward to hearing of your results.
                It's Done Thanks...

                I have one another problem...want to plot only those volume which is Greater then Previous Volume


                SO I did this...

                protected override void OnBarUpdate()
                {

                if (Volume[0] >= Volume[1])
                {
                Value[0] = Volume[0] ;

                }
                else
                {
                Value.Reset();
                }
                }

                But it is plotting nothing

                Comment


                  #9
                  Hello svadukia,

                  Thanks for the reply.

                  I am able to plot this in my attempt. Please see the attached example and let me know if you do not see the plot.
                  Attached Files

                  Comment


                    #10
                    Originally posted by NinjaTrader_ChrisL View Post
                    Hello svadukia,

                    Thanks for the reply.

                    I am able to plot this in my attempt. Please see the attached example and let me know if you do not see the plot.
                    It's Done though had to add,

                    If ( CurrentBar < 1) return;


                    otherwise, it was not plotting.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    650 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    370 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    109 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    574 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    577 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X