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

    #31
    Thanks Austin

    I did my RayLine script as you did I dont see nothing of nothing.

    My background color is LightSeaGreen I can see very well a white line (I put 5 on thickness) even so I already have others indicators with white lines on panel 2 as I told you before. This problem only happen on Price panel. Why? I don't know

    Thanks

    Comment


      #32
      Thanks RyanM

      Do you segest to know how many barsago was last SwingHigh on CCI, I use samething like CCI(period)[2]<CCI(period)[1] && CCI(period)[1]>CCI(period)[0] insted CCI(period)[0] == cciSwingHighDataSeries[0]?

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


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

      Thanks

      Comment


        #33
        Because of the nature of these types of indicators, you can't expect a reliable MRO value. The occurrence of a SwingHigh is not known until future data arrives. These indicators are mainly used for their visual appearance. You can read more discussions on this indicator by doing a forum search for "Swing".
        Ryan M.NinjaTrader Customer Service

        Comment


          #34
          Hi

          Concerning the issue of I don't see DrawLine's using on scripts on Price Panel, I discovery now that all indicators with DrawLines functions on scripts are going to panel 2 where I already have indicators with DrawLine function working good. This happen even I ask to put on other panel different of panel 2. With AutoTrendLines indicator (posted on forum) the lines are going to panel 2 and Arrows stay on panel 1, indicator is allocated to panel 1.

          Is this normal?

          Thanks

          Comment


            #35
            Can you please tell me which function give us BarsAgo consecutive bars of something without look back period argument as BarsAgo_Consecutive (Close[0]>Open[0])>0, tell us how BarsAgo consecutive green bars in a row in this case since first one once is >0 independentelly of the look back period.

            CountIf(delegate {return Close[0] > Open[0];}, 10) > 0 and MRO(delegate{return Close[0]>Open[0] ;},1,CurrentBar); have occurences


            Can you tell me if there is any operator for "And Not" if I wont exclud samething (&& is to include (and))

            Close[0] > Open[0] && High[0]>High[1] & Not (......) if what is in (...) is true we have a true result if it is false we have a false result


            Thanks

            Comment


              #36
              Rita, you would need to set DrawOnPricePanel as needed for your indicators, if you want to mix panels, I suggest using an indicator for each panel with DrawOnPricePanel set as needed.

              There's no operator for 'does not include' just set your conditions up to express the opposite to produce the final condition you're looking for then.

              I'm not sure I fully follow on the BarsAgo issue, CountIf / MRO / LRO will need to get inputted how many bars to lookback - you could work by expressing this lookback dynamically / adaptively or custom coding your count then.
              BertrandNinjaTrader Customer Service

              Comment


                #37
                Thanks Bertrand

                I already had all indicators set DrawOnPricePanel= false that I want out of price panel, now I set DrawOnPricePanel=true for AutoTrend Lines that works on Price painel.

                I doesn't fix the problem.

                I set the inicators to panel 3, 4 or 1 and the indicators are showed on panel 2 for all of them, but on setup is 3, 4 etc.

                I tried to open a new chart default I put AutoTrend Lines there and it doesn't show and here I only have this indicator

                This must be other problem

                Thanks

                Comment


                  #38
                  Rita, it sounds like you're dealing with potentially corrupted workspaces here - can you please exit NT, go to the Documents\NinjaTrader 6.5\workspaces folder, move all XML out of this folder and then restart NT fresh. Then connect, open a chart and plot your indicators - are the drawing still not showing up as dictated by the DrawOnPricePanel settings? Please note that you can't direct those to a specific panel # though.
                  BertrandNinjaTrader Customer Service

                  Comment


                    #39
                    Thanks Bertrand

                    Bingo! It works now very well. Can you please tell me why the workspaces was corrupted ?

                    Now other issue: why appears on Output Window 25-07-2010 23:00:29 decimals= f1
                    25-07-2010 23:00:29 decimals= f1 on the end? Is this an error?Nothing on Log. What to do? Same times appear others not.

                    My code is:
                    BarsAgo_XHMABarsup = MRO(delegate{return (CrossAbove(Close, HMA(slowperiod), 1));},1,CurrentBar) +1;//

                    BarsAgo_XHMABarsdown = MRO(delegate{return (CrossBelow(Close, HMA(slowperiod), 1));},1,CurrentBar) +1;//

                    Print("START");
                    if (BarsAgo_XHMABarsup > -1)
                    Print(BarsAgo_XHMABarsup);
                    if (BarsAgo_XHMABarsdown > -1)
                    Print(BarsAgo_XHMABarsdown);


                    END PRINT to OUTPUT WINDOW:

                    START
                    7
                    4
                    START
                    8
                    5
                    START
                    1
                    6
                    START
                    2
                    7
                    25-07-2010 23:00:29 decimals= f1
                    25-07-2010 23:00:29 decimals= f1

                    Thanks

                    Comment


                      #40
                      Can you please tell me which is the metod to calculate how many bar ago start a Rising SMA or a Falling SMA first occurence and 2nd occurence?

                      I use

                      BarsAgo_SMABarsup = MRO(delegate{return (Rising(SMA(slowperiod)));},1,CurrentBar) ;//


                      Give always 1 during the Rising because is always true and occurence is setting to 1 .
                      I could do with Rising(SMA(slowperiod))==false but give me a problem for 2nd occurence that would be 1 bar before 1st occurence in this case.

                      Thanks

                      Comment


                        #41
                        Rita, I suggest you custom code this, just record the barNumber then as your condition is true and you can calculate the difference between the currentBar and this saved barNumber to know how many bars have passed.

                        Workspaces could become corrupted on a crash or for example a power outage, unfortunately only a regular backup would help here to be able to recover quickly.

                        For the prints - I wouldn't know why you see the decimals print - please check all the Print statements in your complete NinjaScript's running to see where it may originate from.
                        BertrandNinjaTrader Customer Service

                        Comment


                          #42
                          Hi

                          Can you please tell me how to reference Open, High,Low from secondary time frame in a multi time frame strategy? I want to have one line on Open of secondary time frame on primary chart.

                          I put like next and gave an error The best overloaded method match for 'NinjaTrader.Indicator.IndicatorBase.Close' is a 'property' but is used like a 'method' CS0118

                          if (Open(BarsArray[1][0])>0)
                          {

                          DrawLine("tag1", false, 0, Open(BarsArray[1][0]), 0, Open(BarsArray[1] [0]), Color.LimeGreen, DashStyle.Dot, 2);
                          }

                          Is it correct put bar start and bar end as 0 (Zero) on line?

                          Thanks

                          Comment


                            #43
                            RitaPacheco,

                            To get OHLC of a secondary time frame you would not use BarsArray[]. Instead you would uses Closes[][], Highs[][], etc. Note the extra "s" after the name.

                            Closes[1][0] would give you the secondary's close price for the current bar.
                            Josh P.NinjaTrader Customer Service

                            Comment


                              #44
                              Thanks Josh

                              I want to have on a 8 Ticks rangeBar a DrawLine with the Open of secondary timeframe 16Ticks RangeBar, but so far doesn't work. Can you please tell me what is wrong?

                              I put on Initialize()
                              Add(PeriodType.Range, 16);//16 ticks Range Bars chart as secondary Time frame

                              Than I tried to find the start bar of secondary Open with

                              barsAgoOpen = MRO(delegate{return Close [0] ==Opens[1][0];},1,CurrentBar);

                              Than ......

                              if (BarsInProgress == 0)
                              DrawLine("OpenRange16", false, barsAgoOpen, Opens[1][0],
                              0, Opens[1][0], Color.Cyan, DashStyle.Dash, 10);
                              }

                              Thanks

                              Comment


                                #45
                                RitaPacheco,

                                I am not sure your MRO check is actually valid. The check would likely need to be filtered into BarsInProgress == 0 as well.
                                Josh P.NinjaTrader Customer Service

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by gravdigaz6, Today, 11:40 PM
                                1 response
                                7 views
                                0 likes
                                Last Post NinjaTrader_Manfred  
                                Started by MarianApalaghiei, Today, 10:49 PM
                                3 responses
                                10 views
                                0 likes
                                Last Post NinjaTrader_Manfred  
                                Started by XXtrader, Today, 11:30 PM
                                0 responses
                                4 views
                                0 likes
                                Last Post XXtrader  
                                Started by love2code2trade, Yesterday, 01:45 PM
                                4 responses
                                28 views
                                0 likes
                                Last Post love2code2trade  
                                Started by funk10101, Today, 09:43 PM
                                0 responses
                                9 views
                                0 likes
                                Last Post funk10101  
                                Working...
                                X