Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Detecting if Historical when moving Playback slider

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

    Detecting if Historical when moving Playback slider

    Hi,

    I noticed that when using Playback, when we move the time slider the chart is replayed from beginning of day to the selected time and during all that time the reported State is RealTime

    Not sure if this is this way by design or an error, but if it is this way by design, how can I detect from the code that we are not RealTime but just relocating the time slider to the new selected time ?

    PS : Easy to test ;
    Edit the Strategy SampleMACrossOver

    if (CrossAbove(smaFast, smaSlow, 1))
    {
    Print("OnBarUpdate State = " + State.ToString() );
    EnterLong();
    }
    else if (CrossBelow(smaFast, smaSlow, 1))
    {
    Print("OnBarUpdate State = " + State.ToString() );
    EnterShort();
    }
    When we enable the strategy we get all the previous trades printed as "OnBarUpdate State = Historical"
    Now if we move the time slider to a new date and/or time we get all trades printed as "OnBarUpdate State = Realtime"

    Thanks

    Pablo
    pmaglio
    NinjaTrader Ecosystem Vendor - The Indicator Store

    #2
    Hello pmaglio,


    I have submitted a feature request to the product management team for the following feature :

    This customer would like NinjaScript strategies to have a distinct State when the playback connection is fast forwarding at maximum speed after the slider is advanced forward
    I will follow up with more information as soon as it's available. If the feature requests already exists, a vote will be added to it.


    Please let us know if there are any other ways we can help.
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      Hello again pmaglio,

      This feature is being reviewed by the product management team and has been assigned the following unique tracking ID


      SFT-1770


      Please let us know if there is any other way we can help.
      Jessica P.NinjaTrader Customer Service

      Comment


        #4
        Hi,
        Is there any news about this ?
        I need to detect if bars are historical or live playback after a user moved the time slider

        Thanks !
        pmaglio
        NinjaTrader Ecosystem Vendor - The Indicator Store

        Comment


          #5
          Hello Pablo,

          Thank you for your post.

          At this time there would not be an update on this item.

          Please let me know if you have any questions.

          Comment


            #6
            Originally posted by NinjaTrader_PatrickH View Post
            Hello Pablo,

            Thank you for your post.

            At this time there would not be an update on this item.

            Please let me know if you have any questions.
            Is there any other way to do this ?
            I mean, if a user selects to start a playback at 10am, how can I identify that between 0 and 10am it is not RealTime ? so we can avoid playing sounds, sending emails, etc....

            Thanks !
            pmaglio
            NinjaTrader Ecosystem Vendor - The Indicator Store

            Comment


              #7
              Hello pmaglio,

              Thank you for your response.

              There would not be a means around the State reporting as Realtime in this scenario.

              Comment


                #8
                𝔸𝕟𝕪 ℕ𝕖𝕨𝕤 ?
                We cant still avoid sending emails or playing sounds when a user rewinds the playback
                pmaglio
                NinjaTrader Ecosystem Vendor - The Indicator Store

                Comment


                  #9
                  Hello pmaglio,

                  Thank you for your post.

                  There is no update on this feature request at this time.

                  I would like to note that you could implement a check for something outside the NinjaScript based events, such as a button on the chart that you add. Add the button to the chart through NinjaScript and then select the button when changing playback times and check for that button as selected in your code to avoid any unwanted actions being taken.

                  Please let me know if you have any questions.

                  Comment


                    #10
                    yes, I know. This is what Im doing now....
                    ....just not so practical as it sounds if doing lot of replays having lot of indicators
                    pmaglio
                    NinjaTrader Ecosystem Vendor - The Indicator Store

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by pjsmith, Today, 01:00 AM
                    1 response
                    10 views
                    0 likes
                    Last Post NT-Roland  
                    Started by alejandro888, Yesterday, 08:41 PM
                    0 responses
                    9 views
                    0 likes
                    Last Post alejandro888  
                    Started by UltraNIX, Today, 02:14 AM
                    0 responses
                    8 views
                    0 likes
                    Last Post UltraNIX  
                    Started by augustfay, Yesterday, 12:06 PM
                    1 response
                    13 views
                    0 likes
                    Last Post NinjaTrader_Jason  
                    Started by klaus w, Yesterday, 12:13 PM
                    2 responses
                    25 views
                    0 likes
                    Last Post klaus w
                    by klaus w
                     
                    Working...
                    X