• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adding Line 20 points above Close Price

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

    Adding Line 20 points above Close Price

    Hello everyone,

    I was hoping someone could program this little addition for me on this indicator? What I am trying to do is simply have ninjatrader draw 1 Horizontal line above the current bid price at 20 points away, and 1 Horizontal line Below the current Bid Price also 20 points away.

    I have included the indicator that I am currently using for drawing the Bid Price, and then I have included a screenshot of what I was trying to get it to look like by adding the above and below Green Horizontal Lines.

    Or if anyone has another indicator that does this task, I can just simply use that indicator instead of having someone program this for me=)

    If anyone can program this, I will be forever grateful for your assistance! Thank you all,
    Attached Files

    #2
    Hi chrinist,

    Are you wanting 20 points or 20 ticks? (Points would be whole dollar)
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by chrinist View Post
      Hello everyone,

      I was hoping someone could program this little addition for me on this indicator? What I am trying to do is simply have ninjatrader draw 1 Horizontal line above the current bid price at 20 points away, and 1 Horizontal line Below the current Bid Price also 20 points away.

      I have included the indicator that I am currently using for drawing the Bid Price, and then I have included a screenshot of what I was trying to get it to look like by adding the above and below Green Horizontal Lines.

      Or if anyone has another indicator that does this task, I can just simply use that indicator instead of having someone program this for me=)

      If anyone can program this, I will be forever grateful for your assistance! Thank you all,
      DIY ?

      Code:
      DrawHorizontalLine("Current_price+20",true,Close[0] + 20,LineColor,HorizLineStyle,line_Size);
      DrawHorizontalLine("Current_price",true,Close[0],LineColor,HorizLineStyle,line_Size);
      DrawHorizontalLine("Current_price-20",true,Close[0] - 20,LineColor,HorizLineStyle,line_Size);

      Comment


        #4
        Hello koganam, I did try your suggestion by adding your code. this was similar to what I was thinking and I tried this but it didnt draw correctly on ninjatrader. All I saw was 1 Yellow Price line but no other horizontal lines.

        Thanks for trying though,

        Anyone else have any ideas =)

        Comment


          #5
          Hello NinjaTrader_ChelseaB, that would be ticks. Thank you for helping me clarify that lol

          Comment


            #6
            Originally posted by chrinist View Post
            Hello koganam, I did try your suggestion by adding your code. this was similar to what I was thinking and I tried this but it didnt draw correctly on ninjatrader. All I saw was 1 Yellow Price line but no other horizontal lines.

            Thanks for trying though,

            Anyone else have any ideas =)
            Then it means that you did not copy correctly what I wrote.

            The picture shows it on GOOGL; the arrows pointing to the levels that you asked for. If you want it in ticks, then you will have to multiply the "20" added to the close by TickSize.
            Attached Files
            Last edited by koganam; 07-16-2014, 02:05 PM.

            Comment


              #7
              Hi chrinist,

              The lines drawn from Koganam's code is placing the lines at 20 points away. Without the autoscale they are off of the chart.

              Try the modified version attached.
              Attached Files
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                Originally posted by NinjaTrader_ChelseaB View Post
                Hi chrinist,

                The lines drawn from Koganam's code is placing the lines at 20 points away. Without the autoscale they are off of the chart.

                Try the modified version attached.
                He asked for lines 20 points away!

                I coded what he asked for.

                Comment


                  #9
                  Hi Koganam,

                  Yes you did!
                  (He did ask for points)

                  Thinking about it though, those lines should be showing because they are set to autoscale true.
                  Chelsea B.NinjaTrader Customer Service

                  Comment


                    #10
                    Originally posted by NinjaTrader_ChelseaB View Post
                    Hi Koganam,

                    Yes you did!
                    (He did ask for points)

                    Thinking about it though, those lines should be showing because they are set to autoscale true.
                    They are showing. Look at the picture that I posted. You may have to increase the contrast or lower the brightness on your screen: yellow on white never shows very well. The ochre arrows are pointing at the lines.

                    Comment


                      #11
                      Hi koganam,

                      I do see them in the screenshot, however, chrinist mentioned he is not seeing the lines.

                      Its possible the script was not compiled and reloaded on the chart though.
                      Chelsea B.NinjaTrader Customer Service

                      Comment


                        #12
                        Originally posted by NinjaTrader_ChelseaB View Post
                        Hi koganam,

                        I do see them in the screenshot, however, chrinist mentioned he is not seeing the lines.

                        Its possible the script was not compiled and reloaded on the chart though.
                        Then, as I said, it means that he did not copy correctly the code that I gave him. Given the results he reported, I am reasonably sure that he is using the same tag for all 3 lines. IOW, he ignored my additions to the tags.

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by U0000999, Today, 05:17 AM
                        0 responses
                        3 views
                        0 likes
                        Last Post U0000999  
                        Started by Prataturry89, Today, 03:40 AM
                        0 responses
                        5 views
                        0 likes
                        Last Post Prataturry89  
                        Started by UltraFastKetoBoost28, Today, 02:43 AM
                        0 responses
                        6 views
                        0 likes
                        Last Post UltraFastKetoBoost28  
                        Started by kojakojids, Today, 02:04 AM
                        0 responses
                        5 views
                        0 likes
                        Last Post kojakojids  
                        Started by pitifak, Today, 01:01 AM
                        0 responses
                        4 views
                        0 likes
                        Last Post pitifak
                        by pitifak
                         
                        Working...
                        X