Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SHARE: NT8 Simple Sample: time based background color

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

    SHARE: NT8 Simple Sample: time based background color

    Script updated on 07/25/2018 see post #4 for details

    Script updated on 05/07/2018 see post #3 for details


    download/rate here: https://ninjatrader.com/support/foru...atid=7&lpage=1





    The attached zip file has 2 versions of the same indicator

    1) ColorRegions uses regular rendering via NT's BackBrush/BackBrushAll
    2) ColorRegionsDX uses SharpDX rendering

    its pretty straight forward, you just have to select a time range to color your chart's background, select a color and it's opacity.
    For the non-SharpDX version, you can also check/uncheck an option to color either only the price panel's background or for all panels.

    It is my understanding that, generally speaking, SharpDX rendering (done right) tends to be more resource friendly than its alternative, but it requires more steps/coding along the way to do the same thing.

    I'm probably just a notch above a beginner coder/programmer/developer. I hope these examples help anybody else who is also looking to learn programming for NT8.
    Attached Files
    Last edited by gubbar924; 07-25-2018, 07:45 PM.

    #2
    Hello gubbar924,

    Thanks for your post.

    You examples will be very helpful to many so thank-you for your contributions to the community.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Update:
      - If you had a previous version installed, please remove it from the "Documents\NinjaTrader 8\bin\Custom\Indicators\downloaded\" folder
      as this version now resides in the "TG" folder/namespace along with the other indicator scripts I've coded.
      - Added an additional "warning" color region to give visual aid to let you know the original time range is about to start/end
      - Optimized some code to reduce overhead


      download/rate here: https://ninjatrader.com/support/foru...atid=7&lpage=1
      Attached Files
      Last edited by gubbar924; 05-07-2018, 03:19 PM.

      Comment


        #4
        new version uploaded


        bug fix: NT8 crashes during the process of resetting chart background color back to null (when local time reaches the "End Time").

        Comment


          #5
          hi, Where is the ColorRegionsDX version of this indicator? I dont see this in user app share?

          Comment


            #6
            Hello mr_trade,

            I believe there is only one indicator.

            You can find the indicator in the NT user apps section of the Ninjatrader ecosystem.

            Here is a direct link for your convenience: https://ninjatraderecosystem.com/use...color-regions/

            Please note: The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              Thanks Paul for replying.
              Yes this is the correct link and after downloading there is no sharpDX within this, as mentioned in the first post.

              1) ColorRegions uses regular rendering via NT's BackBrush/BackBrushAll
              2) ColorRegionsDX uses SharpDX rendering
              I only see the indicator using BackBrush.

              I would like to see a working example other than the On Rendor Example of how to define the X and Y specifically to bar references or time references as unsure how to do this as very different to what im used to within Ninjascript realm.
              The user guides dont really go into detail on this. Do you have any good tutorials or guides on sharpdx? Microsoft is pretty useless too.

              Thankyou,

              Comment


                #8
                Hello mr_trade,

                Thanks for your reply.

                Here is a link to our helpguide section covering SharpDX: https://ninjatrader.com/support/help..._reference.htm

                I would suggest reviewing the indicator, "SampleCustomRender" in your NinjaTrader which is a well-commented script.


                Paul H.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Christopher_R, Today, 12:29 AM
                0 responses
                6 views
                0 likes
                Last Post Christopher_R  
                Started by sidlercom80, 10-28-2023, 08:49 AM
                166 responses
                2,234 views
                0 likes
                Last Post sidlercom80  
                Started by thread, Yesterday, 11:58 PM
                0 responses
                3 views
                0 likes
                Last Post thread
                by thread
                 
                Started by jclose, Yesterday, 09:37 PM
                0 responses
                7 views
                0 likes
                Last Post jclose
                by jclose
                 
                Started by WeyldFalcon, 08-07-2020, 06:13 AM
                10 responses
                1,414 views
                0 likes
                Last Post Traderontheroad  
                Working...
                X