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

Advanced dynamic drawing

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

    Advanced dynamic drawing

    for my current project i need something that is a little bit different than anything ive used so far and it puts my in a bit of a problem.

    to describe the general problem in a simple way (outside of what im actually tryin to do) ....

    lets assume i have an int value(n) that is calculated and potentially changed for every bar update. the value it can have is pretty much random and isn bound in a specific range. so it can essentailly be any real number.

    i now wanna dynamicly draw as many (for example) horizontal lines as n is big. so for n=5 it should draw 5 lines. for n=46 46 lines and so on.

    has anyone an idea how to even get started with this?

    would be great.

    #2
    Originally posted by BigRo View Post
    for my current project i need something that is a little bit different than anything ive used so far and it puts my in a bit of a problem.

    to describe the general problem in a simple way (outside of what im actually tryin to do) ....

    lets assume i have an int value(n) that is calculated and potentially changed for every bar update. the value it can have is pretty much random and isn bound in a specific range. so it can essentailly be any real number.

    i now wanna dynamicly draw as many (for example) horizontal lines as n is big. so for n=5 it should draw 5 lines. for n=46 46 lines and so on.

    has anyone an idea how to even get started with this?

    would be great.
    A for loop, using the number as the limit for the index?

    Comment


      #3
      i googled what that is and it indeed looks quite fitting. i will take a look into that and if i run into a problem i will come back here. thanks.

      Comment


        #4
        Hello,
        Koganam is correct that a for loop could do this.
        You could use the following for loop:
        Code:
        private int numberOfHorizontal = 5;
        for(int i = numberOfHorizontal = 5; i > 0; i--) 
        {
            DrawHorizontalLine("stringtag" + Time[0], double, Color);
        }
        You can view the NinjaTrader documentation on For lopps and other looping commands at the following link: http://ninjatrader.com/support/helpG...g_commands.htm
        Cody B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by rajendrasubedi2023, Today, 09:50 AM
        3 responses
        15 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by lorem, Today, 09:18 AM
        2 responses
        11 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by geddyisodin, Today, 05:20 AM
        4 responses
        29 views
        0 likes
        Last Post geddyisodin  
        Started by geotrades1, Today, 10:02 AM
        2 responses
        9 views
        0 likes
        Last Post geotrades1  
        Started by ender_wiggum, Today, 09:50 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X