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

+9Bar Timer Modification

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

    #16
    Kate ,

    should I be using the
    <AddChartIndicator(MyBarTimer1);> every time I add an indicator?

    Comment


      #17
      Hello galsermil,

      Thank you for your reply.

      Not necessarily, but it would be needed in this case since that particular indicator looks for ChartControl.

      Please let us know if we may be of further assistance to you.
      Kate W.NinjaTrader Customer Service

      Comment


        #18
        Kate,

        I keep expanding off the same strategy and I have one expansion that keeps changing itself to <exclude From Compilation>, I change it back and compile without an issue but when I go back it is back to exclude.

        Comment


          #19
          Kate,

          Everything is good except I still only get -0- for secs left in both the indicator and and the Strategy. I know what it is but I don't know how to fix it.
          timeLeft = (barTimeLeft.Ticks < 0
          ? "00:00:00"
          : barTimeLeft.Hours.ToString("00") + ":" + barTimeLeft.Minutes.ToString("00") + ":" + barTimeLeft.Seconds.ToString("00"));

          This all takes place in: rivate void OnTimerTick(object sender, EventArgs e)

          Comment


            #20
            Hello galsermil,

            Thank you for your reply.

            I am not seeing the same on my end with this reduced version of your script:

            Click image for larger version

Name:	2022-03-17_10-08-39.png
Views:	42
Size:	140.3 KB
ID:	1194290

            I'm seeing the prints from the strategy match what I'm seeing on the chart.

            If you test with the attached reduced example, do you see the prints as you would expect?

            Thanks in advance; I look forward to assisting you further.
            Kate W.NinjaTrader Customer Service

            Comment


              #21
              Kate,
              World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.

              I am getting rather strange results. See the screenshot

              Comment


                #22
                I sent you the wrong Output Tab. TThis one is different but not much better.https://www.screencast.com/t/1O5ePkUCIBQ

                Comment


                  #23
                  Kate,

                  Dummy that I am, are we not going to get rather strange results when printing by the tick?

                  Comment


                    #24
                    Kate,
                    I thought that I was real smart and introduced <IsFirstTickOfBar> which was ridiculous, and I got a couple of high powered errors so I changed it back but now on two charts, I get all -0-'s.

                    Comment


                      #25
                      Hello galsermil,

                      Thank you for your replies.

                      The second screenshot you've provided is printing as I would expect. Make sure you're only doing the prints on the primary series since that's what BarTimer is running on. As there may be multiple ticks in a second, I'd expect to see it print like your second screenshot.

                      Please let us know if we may be of further assistance to you.
                      Kate W.NinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

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