Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

alerts

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

    #16
    Originally posted by NinjaTrader_Bertrand View Post
    Try work only on one condition until you're confident this is what you're after, for example you have a lookback setting of 2 in all your condition, thus some double dots following each other would be expected, if I comment out all but the first condition you've setup and change the lookback for the CrossAbove to 1 it works as expected -

    Code:
     
    if (CrossAbove(DiPlus, 20, 1))//1 is width of dot?
    //DrawDot("di+20 up" + CurrentBar, false, 0, Low[0], Color.White);
    DrawDot("di+20 up" + CurrentBar, false, 0, Low[0]- (TickSize*dist), Color.Lime);
    Thanks, I thought changing the 1 to the 2 made the dots larger--you mean I created a lookback.

    Comment


      #17
      Correct, you want to enter 1 here in your case, it does not change the dot width as you suspected, the dots have a default size.

      Comment


        #18
        Originally posted by NinjaTrader_Bertrand View Post
        Correct, you want to enter 1 here in your case, it does not change the dot width as you suspected, the dots have a default size.
        thanks its fixed.

        Comment


          #19
          Originally posted by NinjaTrader_Bertrand View Post
          Correct, you want to enter 1 here in your case, it does not change the dot width as you suspected, the dots have a default size.

          So using the 1 in the statement should be exactly the same result as inserting && DiPlus[1] <= 20)

          Correct?

          Comment


            #20
            Did you ever figure out why Overlay=false; didnt put the dots on the indicator panel instead of on the candle panel?

            Comment


              #21
              No, the outcomes would still be different, in your case juse use the Cross over with a lookback of 1 - you want to work with DrawOnPricePanel for this, not with the overlay one - http://www.ninjatrader-support.com/H...ceOnPanel.html

              Comment


                #22
                Originally posted by NinjaTrader_Bertrand View Post
                No, the outcomes would still be different, in your case juse use the Cross over with a lookback of 1 - you want to work with DrawOnPricePanel for this, not with the overlay one - http://www.ninjatrader-support.com/H...ceOnPanel.html
                i tried adding DrawOnPricePanel=false; in the initialize section but it didnt work.
                Should I maybe add it after each DrawDot statement or maybe after the fourth DrawDot statement or somewhere else?

                Comment


                  #23
                  If you want to plot on the indicator panel with this scripts, you would then also need to adapt your Y values used in the DrawDot calls, right now you plot them at the highs and lows of the price panel, this will need a change to the DiPlus / Minus indicator values.

                  Comment


                    #24
                    Originally posted by NinjaTrader_Bertrand View Post
                    If you want to plot on the indicator panel with this scripts, you would then also need to adapt your Y values used in the DrawDot calls, right now you plot them at the highs and lows of the price panel, this will need a change to the DiPlus / Minus indicator values.
                    Like this?

                    Code:
                                   if (CrossAbove(DiPlus, 20, 1))        DrawDot("di+20 up" + CurrentBar, false, 0, [COLOR=red]DiPlus[0]-(TickSize*dist)[/COLOR], Color.Lime);                  if (CrossAbove(DiMinus, 20,1))        DrawDot("di-20 up" + CurrentBar, false, 0, [COLOR=red]DiMinus[0]-(TickSize*dist)[/COLOR], Color.Red);                  if (CrossAbove(DiPlus, 25,1 ))        DrawDot("di+25up" + CurrentBar, false, 0, [COLOR=red]DiPlus[0]-(TickSize*dist)[/COLOR],Color.Lime);                    if (CrossAbove(DiMinus, 25,1 ))        DrawDot("di-25 up" + CurrentBar, false, 0, [COLOR=red]DiMinus[0]-(TickSize*dist)[/COLOR],Color.Red);
                    Last edited by simpletrades; 10-26-2009, 11:17 AM.

                    Comment


                      #25
                      Yes, like this - but you would need to adjust your tick size multiplier of course, too.

                      Comment


                        #26
                        Originally posted by NinjaTrader_Bertrand View Post
                        Yes, like this - but you would need to adjust your tick size multiplier of course, too.
                        Thanks it works fine now.
                        One more related question from the same indicator...

                        Add(new Plot(new Pen(Color.Transparent, 1), "ADX"));
                        Add(new Plot(Color.Green, "+DI"));
                        Add(new Plot(Color.Red, "-DI"));

                        Does the 1 in the ADX statement refer to 1 bar ago?
                        If I wanted the 2 DMI's to be a width of 2 without having to fix it on my chart indicator pulldown that way, is it just adding the number in somewhere or is it a whole new statement?

                        Comment


                          #27
                          No, the 1 is the width of the Pen Plot, this is just for visualization, it's not referring to actual ADX indicator values.

                          You can set the Plot width directly in the Initialize(), for example your Plus and Minus values are associated with Plot0 and Plot1 -

                          Code:
                           
                          Plots[0].Pen.Width = 2;
                          Plots[1].Pen.Width = 2;
                          This will set them to a default width of 2.

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                          0 responses
                          596 views
                          0 likes
                          Last Post Geovanny Suaza  
                          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                          0 responses
                          343 views
                          1 like
                          Last Post Geovanny Suaza  
                          Started by Mindset, 02-09-2026, 11:44 AM
                          0 responses
                          103 views
                          0 likes
                          Last Post Mindset
                          by Mindset
                           
                          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                          0 responses
                          556 views
                          1 like
                          Last Post Geovanny Suaza  
                          Started by RFrosty, 01-28-2026, 06:49 PM
                          0 responses
                          554 views
                          1 like
                          Last Post RFrosty
                          by RFrosty
                           
                          Working...
                          X