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

Slope CCI Max error

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

    #16
    Thanks Bertrand

    Long time later I restarted NT grafic shows up than I reimport my script and it stay stable.

    Now I discovered that my NT don't show any kind of DrawLines (Line,Ray,Horizontal....) that is on a script on Price Panel, but on others panels shows. Because that Automate TrendLine indicator and ohters indicators that is on Forum to show a Line on Close don't work on my NT. I did a simple test with next 2 codes on Panel 2 shows the line on Price Panel no (2nd CODE is equal to the 1stCODE only changed CCI(period)[....] by Low[....] )

    Can you please tell me why?

    Thanks

    1stCODE:

    if (Close[0]>0 )
    {
    // Draws a Ray line
    DrawRay("taga3" ,5, CCI(period)[5] ,0 , CCI(period)[0 ], Color.White,DashStyle.Solid,2);
    }


    2ndCODE:


    if (Close[0]>0 )
    {
    // Draws a Ray line
    DrawRay("taga3" ,5, Low[5] ,0 , Low[0 ], Color.White,DashStyle.Solid,2);
    }

    Comment


      #17
      Hello,

      I am jumping in here, but I will try to assist.
      I am sorry, there is a setting for that, but I am not recalling what it is at this moment. I will have someone reply on Monday with more info.
      DenNinjaTrader Customer Service

      Comment


        #18
        Hi there, please try setting DrawOnPricePanel = true in the Initialize() section of your indicator.
        AustinNinjaTrader Customer Service

        Comment


          #19
          Hello RitaPacheco,

          Draw objects are placed on the price panel, or on the indicator panel that they're applied with. This is controlled by the property DrawOnPricePanel.

          In your example, there may be a big differences with the values for CCI and the values for Low. CCI values aren't going to be near market prices, and so your draw objects won't be visible here or will adjust the scaling of the chart substantially to accommodate.
          Ryan M.NinjaTrader Customer Service

          Comment


            #20
            Thanks Austin for the SMAZeroLine Indicator now I already know to do it



            Fine

            Thanks

            Comment


              #21
              Thanks RyanM

              I understand what you mean with the big difference of values between CCI and Price.

              I did the test separately of course. Even so I test it as well together and on 2nd panel works good (2 lines one on CCI values and other on the Price value level inside 2nd panel). When there is this problem Price panel expand automatically to see all indicators.

              There is same thing that don't let me have DrawLines (any kind) on Price panel and is not DrawOnPricePanel = false; because I already tried to force with this command =true to have Lines on Price Panel.

              On the other end there are 3 Indicators at least that don't work on my NT that work with lines on price panel and I didn't any thing on script (AutoTrendLine; PriceLine_Indicator; DH_HorizPriceLine) that is strange that with AutoTrendLine I can not see Lines but I see Arrows. And I have others indicators on price panel with Arrows that work fine the problem so far is only with Lines.

              By the way is it possible blow-up the Arrow size any command to do it?

              Thanks

              Comment


                #22
                Unfortunately there is no way to change the size of the arrow.

                With regards to drawing on price panel: Let us know the code you're using to test this and check if there are any related messages in the log tab of the control center.

                Also let us know the version of the platform you're using. Check with Help > About.
                Ryan M.NinjaTrader Customer Service

                Comment


                  #23
                  Thanks RyanM

                  I 'm sending to you 5 scripts that don't work on my NT version 6.5.1000.16.

                  Only LineTest was done by me

                  Thanks
                  Attached Files

                  Comment


                    #24
                    RitaPacheco,

                    Please clarify what exactly isn't working? What does it do instead then? Any errors in Control Center logs? Thanks.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #25
                      No one works

                      Thanks

                      Comment


                        #26
                        RitaPacheco,

                        Please be clear how you determine it is not working. What happens instead if it is not working? Please confirm what you see in the Control Center logs.
                        Josh P.NinjaTrader Customer Service

                        Comment


                          #27
                          Thanks Josh

                          >>>Please be clear how you determine it is not working. <<<<<

                          It is not working because don't show any Line but on case of AutoTrendLine don't show Lines but show Arrows. Other ones don't show any thing because only have Lines.

                          <<<What happens instead if it is not working? >>>>

                          All others indicators working fine but not indicators that have Lines and if they are on Price Panel. I have others indicators with lines working good on Panel 2 with CCI indicator together,

                          <<<<<Please confirm what you see in the Control Center logs. >>>>

                          Everything normal lines white no signal of errors

                          Thanks

                          Comment


                            #28
                            Can you tell me please how to know how BarsAgo was last CCISwingHigh or CCISwingLow

                            I already tried with next code but don't give me exact value give the swing before last. I have the last SwingHigh at 2 barsAgo and it say 6 when was the preview SwingHigh


                            MRO(delegate{return (CCI(period)[0] == cciSwingHighDataSeries[0]);},1,CurrentBar));


                            cciSwingHighDataSeries.Set(Swing(CCI(period), 1).SwingHigh[0]);


                            Thanks

                            Comment


                              #29
                              Rita, for your scripts, you will have to debug the scripts. I opened one up to take a look, and I believe you are missing the autoscale argument for each drawing you wish to do. Also, depending on the background color of your charts, the ray might be invisible because the color is set to white.

                              Another possible issue could be the fact that on your drawing objects, you try to access data from a few bars ago, and on the first bar on the chart this could cause an issue because these bars don't yet exist. You can add a CurrentBar check to avoid this issue.

                              Please try the attached code for your RayTest script and let me know if you run into any issues.
                              Attached Files
                              AustinNinjaTrader Customer Service

                              Comment


                                #30
                                RitaPacheco,

                                Unfortunately using MRO with swing won't necessarily return values you might expect. Swing is a type of indicator that repaints its value based on data points from the future. It works similar to ZigZag in this way. Depending on how it looked at the point in time when you set the DataSeries value it may actually be different when accessed historically. As such is the nature of Swing it does make it difficult to base logic on historical Swings since the historical points change.

                                I took a look at your indicator TesteLinhas. After applying I received the following message in the control center:
                                2010-07-20 14:34:21:099 ERROR: Error on calling the 'OnBarUpdate' method for indicator 'TesteLinhas' on bar 0: Index was out of range. Must be non-negative and less than the size of the collection.

                                You would need to make sure that you have enough bars for the series you're trying to access according to this article:


                                Corrected by adding the following lines:
                                if (CurrentBar < 5)
                                return;

                                It then drew a white line. Please make the correction indicated above, apply to a black background, and let us know your results.
                                Ryan M.NinjaTrader Customer Service

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by PaulMohn, Today, 05:00 AM
                                0 responses
                                6 views
                                0 likes
                                Last Post PaulMohn  
                                Started by ZenCortexAuCost, Today, 04:24 AM
                                0 responses
                                6 views
                                0 likes
                                Last Post ZenCortexAuCost  
                                Started by ZenCortexAuCost, Today, 04:22 AM
                                0 responses
                                3 views
                                0 likes
                                Last Post ZenCortexAuCost  
                                Started by SantoshXX, Today, 03:09 AM
                                0 responses
                                16 views
                                0 likes
                                Last Post SantoshXX  
                                Started by DanielTynera, Today, 01:14 AM
                                0 responses
                                5 views
                                0 likes
                                Last Post DanielTynera  
                                Working...
                                X