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

Opening Bell indicator NT8 - IsFirstBarOfSession not working?

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

    #16
    Is it possible or easy to convert to ninja7?
    thanks!

    Originally posted by hcgaloi View Post
    Hello SBMT17,

    With the help of NinjaTrader_AlanP, I got the OpeningBellAlert indicator working. I have attached the file here. You need to import the indicator to NT8 by Tools->Import->Ninja Script Add-On then choose the .zip file. The indicator sound is default to NT Alert1. If you prefer exchange opening bell sound, I have attached the OpeningBell.wav. You can copy the sound file to NT8 sound folder at Program Files (x86)\NinjaTrader 8\sounds.

    To use the indicator, add it to Daily chart or any intraday chart. There are three user input fields if you want to change them:

    1. Sound file is default to Alert1. You can click on it and pick any .wav file you want (OpeningBell.wav)
    2. Rearm alert is default to 32400 seconds (9 hours), change it to any value that you want
    4. Enable Alert is checked. Uncheck if you don't want an alert.

    Cheers

    [ATTACH]49384[/ATTACH]

    Comment


      #17
      Hello darthy,

      This could be created for NinjaTrader 7.

      However, the attributes for public inputs are different for NinjaTrader 7, and unfortunately, not documented.
      The Bollinger indicator NumStdDev property has a good example of what the attributes for NT7 look like on lines 78 through 80.

      Further, if you want just the time without the date, a TimeSpan can be used instead of a DateTIme.
      Below is a link to a forum post with sample code.


      For porting scripts, below is a link to a forum post with tips.



      That said please note, NinjaTrader 7 is no longer in active development and we are no longer considering new feature requests or changes for NinjaTrader 7. Main development has shifted to our flagship platform NinjaTrader 8. This does mean updates from brokerages, data feeds, or operating systems that require an update in NinjaTrader will not be implemented in NinjaTrader 7 and may cause an interruption in service.

      While there is not a set ETA for the complete discontinuation of NinjaTrader 7, we highly recommend transitioning to NinjaTrader 8 as soon as possible before NinjaTrader 7 reaches its end of life to prevent interruption of service.

      Click below to download NinjaTrader 8.
      NinjaTrader is a futures trading platform that delivers integrated multi-device trading. Discover our best platform to trade futures for active futures traders.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #18
        Hello,

        Been using this indicator PlayAlertWhenTimeIsUserInputtedTime.zip with the opening bell file. However since updating to the latest version of NinjaTrader. There is no longer an alert tick box option inside of the Properties of the PlayAlertWhenTimeIsUserInputtedTime.zip indicator.

        Also all the original NinjaTrader alerts within the > Program Files (x86) > NinjaTrader 8 > sounds folder are all missing. Only the custom sounds are available.

        Can you please advice? ​​

        Comment


          #19
          Hello Chingchongforum,

          Welcome to the NinjaTrader forums!

          The installation folder for 8.0.27.0 has changed to C:\Program Files\NinjaTrader 8\.

          From the help guide release notes:
          "Attention 32-Bit Users:
          64-bit has become the standard for applications in the Windows environment
          As we continue to modernize our desktop platform and clearing up performance related confusions around 32 vs 64 bit NinjaTrader Desktop usage
          NinjaTrader 8.0.27.0 will be solely a 64-bit Windows application, this means the installation directory will change from C:\Program Files (x86) to C:\Program Files"



          If you are referring to the example on post # 7, this only has one property in the code 'TimeTogglerForUI' which is a DateTime object.​
          Chelsea B.NinjaTrader Customer Service

          Comment


            #20
            Originally posted by NinjaTrader_ChelseaB View Post
            Hello Chingchongforum,

            Welcome to the NinjaTrader forums!

            The installation folder for 8.0.27.0 has changed to C:\Program Files\NinjaTrader 8\.

            From the help guide release notes:
            "Attention 32-Bit Users:
            64-bit has become the standard for applications in the Windows environment
            As we continue to modernize our desktop platform and clearing up performance related confusions around 32 vs 64 bit NinjaTrader Desktop usage
            NinjaTrader 8.0.27.0 will be solely a 64-bit Windows application, this means the installation directory will change from C:\Program Files (x86) to C:\Program Files"



            If you are referring to the example on post # 7, this only has one property in the code 'TimeTogglerForUI' which is a DateTime object.​
            Thanks for your reply NinjaTrader_ChelseaB. I've managed to find the sound files with the path you showed.
            I'm still stuck with the PlayAlertWhenTimeIsUserInputtedTime indictor not playing the Openingbell.wav sound since updating. It was fine before. Can you please assist?

            Comment


              #21
              Hello Chingchongforum,

              Use Print() to understand the behavior and debug.

              Print the time of the bar, print the value of the State property (so we can ensure the bar has closed in real-time), and all values used in the condition.

              Are you seeing the condition has evaluated as true in real-time?

              Below is a link to a forum post that demonstrates using prints to understand behavior.
              Chelsea B.NinjaTrader Customer Service

              Comment


                #22
                So, does anyone have a working opening / closing bell indicator that they would be willing to share? I tried making my own, no dice (incompetent when it comes to coding). Also, I read thru the older related posts…to fragmented.

                TIA​

                Comment


                  #23
                  Hello tomturn,

                  Welcome to the NinjaTrader forums!

                  The OpeningBellAlert indicator posted by in post # 8 is working on my end without issue.

                  Below is a link to a video of a test of this
                  https://drive.google.com/file/d/1n1I...usp=share_link

                  This is only the opening bell which is found when Bars.IsFirstBarOfSession and IsFIrstTickOfBar are both true.

                  The close of a session would be a bit more complex, as OnBarUpdate() would not trigger until the open of the next session when the end session bar closes. Instead, it would be possible to check the time of each MarketUpdate to be after the .ActualSessionEnd when using a sessionIterator in OnMarketData().
                  https://ninjatrader.com/support/help...sessionend.htm
                  https://ninjatrader.com/support/help...marketdata.htm


                  If you would like to learn how to create NinjaScripts, I would first recommend learning C#, either through tutorials or from a formal educator such as a boot camp, then watch the training videos for the Stategy Builder and NinjaScript Editor, then learn from open source examples and the help guide.

                  Below is a link to a forum post with helpful resources on getting started with C# and NinjaScript.
                  https://ninjatrader.com/support/foru...pts#post786040

                  We are happy to answer any questions you may have about NinjaScript if you decide to code this yourself. We are also happy to assist with finding resources in our help guide as well as simple examples, and we are happy to assist with guiding you through the debugging process to assist you with understanding unexpected behavior.

                  You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like a list of affiliate consultants who would be happy to create this script or any others at your request or provide one on one educational services.​
                  Chelsea B.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by fx.practic, 10-15-2013, 12:53 AM
                  5 responses
                  5,406 views
                  0 likes
                  Last Post Bidder
                  by Bidder
                   
                  Started by Shai Samuel, 07-02-2022, 02:46 PM
                  4 responses
                  98 views
                  0 likes
                  Last Post Bidder
                  by Bidder
                   
                  Started by DJ888, Yesterday, 10:57 PM
                  0 responses
                  8 views
                  0 likes
                  Last Post DJ888
                  by DJ888
                   
                  Started by MacDad, 02-25-2024, 11:48 PM
                  7 responses
                  160 views
                  0 likes
                  Last Post loganjarosz123  
                  Started by Belfortbucks, Yesterday, 09:29 PM
                  0 responses
                  9 views
                  0 likes
                  Last Post Belfortbucks  
                  Working...
                  X