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

Draw.Region not working ...

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

    #16
    Originally posted by NinjaTrader_ChelseaB View Post
    Hello Frank,

    You are probably seeing the vertical grid lines through the opacity of the area.

    What area opacity have you chosen?
    Hi Chelsea:

    Both grid lines have Visible unchecked. I'm not sure if the Properties settings in the Price panel also controls the Indicator Panels if in fact they are separate. In any case I clicked in both the Price and Indicator panel and if they are different controls the Grid (H & V) were set not Visible in both.

    The opacity for the DrawRegion was set to 75 and I changed it to 100 and then to 30. The lines were always there but obviously less visible at 30.

    Comment


      #17
      Hello Frank,

      This would not be specific to the panel or the indicator.

      This would be for the entire chart in the Chart Properties window.

      (Or something else is drawing those lines that are being overlapped by the region. Maybe its the trading hours break line. Maybe its another indicator.)

      In other words, the lines are being drawn by something and they are showing through the opacity of the region area.

      I was not able to confirm, what is the opacity you have set the region to?
      If you set this to 100, are you able to see the lines?

      On my end, I have disabled Grid line > vertical and I am not seeing any vertical lines through the region. I've left the horizontal lines on and darkened these for reference.
      Attached Files
      Chelsea B.NinjaTrader Customer Service

      Comment


        #18
        Hi Chelsea:

        I can see that your sample doesn't have the lines.

        There are no other indicators in the chart. The lines are exactly at the center line of each bar.. If it were the trading hours break line I would think there would only be one.

        Restated from previous post.

        "The opacity for the DrawRegion was set to 75 and I changed it to 100 and then to 30. The lines were always there but obviously less visible at 30."

        The screenshot was taken with the opacity set to 100.

        The same thing happens in the SMA sample in NT7.

        Strange.
        Attached Files

        Comment


          #19
          Hi Chelsea:

          Being that it happens on NT7 and NT8 I am wondering if it has something to do with the type/vendor/model of the video card that I'm using?

          Comment


            #20
            Hello Frank,

            May I have your workspace file where this chart is saved?

            You will find your NinjaTrader log files in the following directory:
            (My) Documents\NinjaTrader 8\workspaces\

            The workspace will have the name you saved in the Workspaces menu on the Control Center. (The _Workspaces(.xml) file is not the correct file)
            Chelsea B.NinjaTrader Customer Service

            Comment


              #21
              The unload will not accept .XML files, I sent them as an email attachment but will change them to .txt and upload them here if desired.

              Uploaded an SS of the same problem using the SMARegion sample on NT7
              Attached Files
              Last edited by Cheech; 06-12-2018, 09:38 AM.

              Comment


                #22
                Hi Frank,

                Zip that .xml file up and it should allow you to upload it.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #23
                  For any community members viewing this thread,

                  The issue with the lines appearing with the Draw.Region() comes from the logic of the SMARegions script for NT7 I had suggested.

                  Instead of incrementing the tag name when the cross occurs, this script is incrementing the tag name on every new bar. This causes a new drawing object to be created for every bar on the chart instead of the segments between crosses. Each of the drawing objects is separated by that very small space.

                  To correct the lines, change the logic to only increment the tag when the cross occurs and not on every bar.
                  Chelsea B.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by XXtrader, Yesterday, 11:30 PM
                  2 responses
                  11 views
                  0 likes
                  Last Post XXtrader  
                  Started by Waxavi, Today, 02:10 AM
                  0 responses
                  6 views
                  0 likes
                  Last Post Waxavi
                  by Waxavi
                   
                  Started by TradeForge, Today, 02:09 AM
                  0 responses
                  11 views
                  0 likes
                  Last Post TradeForge  
                  Started by Waxavi, Today, 02:00 AM
                  0 responses
                  2 views
                  0 likes
                  Last Post Waxavi
                  by Waxavi
                   
                  Started by elirion, Today, 01:36 AM
                  0 responses
                  7 views
                  0 likes
                  Last Post elirion
                  by elirion
                   
                  Working...
                  X