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

arrow issues

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

    #31
    Didn't work,
    here's how the onbar update looks now.
    if ( Close[0]< Open[0] && Close[0]<Low[1] && CurrentBar- saveBar > 3) //>1 removes 2nd arrow, >2removes next 2 repeat arrows >0 removes none
    {
    DrawArrowDown(" down" + CurrentBar, false, 0, High[0]+ (TickSize*dist), Color.White);
    saveBar = CurrentBar; // save the current bar number
    }

    if (alertBool)PlaySound(@"C:\mysounds\Alert1.wav");
    }
    and Variables had this: private bool alertBool;

    Properties is the same as the cs file I uploaded

    Comment


      #32
      Actually don't look yet.
      I had the indicators set to False for Alert on Begin/End?
      I'll wait for more bars first.

      Comment


        #33
        It just alerted, thanks

        Comment


          #34
          Hello simpletrades,

          The example you show would play the sound on every bar. I recommend that you change as follows to only play sound when drawing an arrow:

          Code:
          if ( Close[0]< Open[0] && Close[0]<Low[1] && CurrentBar- saveBar > 3)
          {
          DrawArrowDown(" down" + CurrentBar, false, 0, High[0]+ (TickSize*dist), Color.White); 
          saveBar = CurrentBar; // save the current bar number
          if (alertBool)PlaySound(@"C:\mysounds\Alert1.wav");  // play sound when drawing arrow
          }
          Paul H.NinjaTrader Customer Service

          Comment


            #35
            Thanks i was testing the sounds on a 30 sec chart and that change makes a big difference,

            Comment


              #36
              when I want to block out multiple lines of code but not do // each line, isn't there a way to block out multiple lines at once?

              Comment


                #37
                Hello simpletrades,

                Thanks for your post.

                You can use /* at the beginning of the section to block out and then */ to end.

                Reference: http://ninjatrader.com/support/helpG...sic_syntax.htm
                Paul H.NinjaTrader Customer Service

                Comment


                  #38
                  thanks for all your help

                  Comment


                    #39
                    How would I write a program just to recolor the 3rd bar of the same color on its close?
                    If Close[0]>Open[0] && Close[1]>Open[1] && Close[2]>Open[2] then what?

                    Comment


                      #40
                      Hello simpletrades,

                      Thanks for your post.

                      To change the color of a prior bar use BarColorSeries[int barsAgo] Please see: http://ninjatrader.com/support/helpG...olorseries.htm

                      Alternatively if you only wish to set the color of the current bar, then you could use: BarColor. Please see: http://ninjatrader.com/support/helpG.../?barcolor.htm

                      Both references contain examples of use.
                      Paul H.NinjaTrader Customer Service

                      Comment


                        #41
                        Will those scripts you helped with for the arrows and dots be ninja 8 compatible or will I need to rewrite parts of them if I switch?

                        Comment


                          #42
                          Hello,

                          Thanks for your post.

                          All NT7 scripts would need to be rewritten for NT8.
                          Paul H.NinjaTrader Customer Service

                          Comment


                            #43
                            With my limited skill will I have hard time redoing the 2 types?
                            Based on what you saw up to now
                            and can I unupgrade if I cant fix them?.

                            Comment


                              #44
                              Hello simpletrades,

                              Thanks for your reply.

                              NinjaTrader 8 will install separately from Ninjatrader7 you can actually have both on your computer and use one or the other without issue. NinjaTrader7 will be supported for quite some time so there is no mandate to upgrade until you are ready to.

                              As far as converting the code you have already created, the changes in your code are not that extensive so it certainly can be done and just requires patience and the helpguide.
                              Paul H.NinjaTrader Customer Service

                              Comment


                                #45
                                I just tried creating Guppy on Ninja 8--it's just 12EMAs in one package.
                                I compiled it, no errors, can see it in Documents on my pc under bin/custom/indicators after the Ninja provided ones are listed but on a chart it is not in the indicator list.
                                It also appears in the tab for NinjaScript editor if I click on Indicators,
                                How do I add it to my chart?
                                Thanks and Happy Thanksgiving.

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by quantismo, Yesterday, 05:13 PM
                                1 response
                                12 views
                                0 likes
                                Last Post NinjaTrader_Gaby  
                                Started by The_Sec, 04-16-2024, 02:29 PM
                                3 responses
                                15 views
                                0 likes
                                Last Post NinjaTrader_ChristopherS  
                                Started by hurleydood, 09-12-2019, 10:45 AM
                                15 responses
                                1,097 views
                                0 likes
                                Last Post Leeroy_Jenkins  
                                Started by danieldunn2024, Today, 03:06 AM
                                1 response
                                5 views
                                0 likes
                                Last Post NinjaTrader_Erick  
                                Started by cre8able, Yesterday, 04:16 PM
                                1 response
                                16 views
                                0 likes
                                Last Post NinjaTrader_Gaby  
                                Working...
                                X