• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8b9 Stopping strategy from submitting realtime orders (only historical)

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

    NT8b9 Stopping strategy from submitting realtime orders (only historical)

    In NT7 I could write in OnBarUpdate:
    Code:
                if (!Historical) return;
    to stop strategy from submitting live orders.
    Trying similiar with NT8b9:
    Code:
                if (State != State.Historical) return;
                //or:
                if (State == State.Realtime) return;
    doesn't stop it from submitting live orders. Is there any other way of doing it? If not, consider it a bug report.

    #2
    Hello,

    Thank you for the question.

    I tried the following syntax to see if logic was being executed, but can not confirm the results you are. Could you provide the test script you are using that you see this happening? Also what connection and account are you using during this test?

    if(State == State.Realtime) return;
    Print(State);
    if(State == State.Realtime) EnterLong();

    The EnterLong in this case was never reached, neither was the Print for Realtime but I did see Historical to know it was iterating.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Your sample doesn't catch the error (also on my machine) so I will try to write the minimal version of the strategy that does it.

      For these tests I am connected to Kinetick - so far only one strategy shows this behaviour.

      Comment


        #4
        Ok, here it is. The prerequisites for this behaviour to happen are (both at the same time):
        - EntryHandling.AllEntries
        - Limit order: an overload with bool isLiveUntillCancelled set to true

        Attached is sample strategy submitting order every time it is loaded.

        PS. I didn't specify but I was testing it on Kinetick Free End of Day feed (and adding strategy to intraday chart), but I suppose it will be the same for other connections.
        Attached Files

        Comment


          #5
          Hello,

          Thank you for the reply.

          I am confused on the test you are trying here, the Kinetick EOD connection does not have Intrabar data, are you using Intrabar data from another connection? I would be unable complete this as a test as the connection does not allow for charts less than 1 day.

          Can you confirm if you are using data from another connection? If so, I would like the steps for that connection instead as the EOD connection would not be expected to be used for live Realtime trading.


          While testing on a Live data feed (Kinetick), I do not see what you are saying is happening, Instead I see historical orders but no Print of the State.RealTime.


          Please let me know if I may be of further assistance.
          JesseNinjaTrader Customer Service

          Comment


            #6
            Don't need to overthink The connection is not important here, just answering your question but if you need details:
            Of course I have data from other sources but in order to enable strategy one must be connected to something so I use Kinetick End of Day for development (as a dummy connection) as I don't want my development strategies to accidentally submit orders.

            Now back to point your observation that it doesn't print "RealTime" to output window is correct. What is most likely happening is the strategy is submitting last historical order live since it is set isLiveUntilCancelled = true; and not as I thought initially that State.RealTime is being ignored.

            Here is the screencast with what is happening:
            http://screencast.com/t/ro6jhfVni

            In your case it could be that the last bar didn't meet the limit order criteria to be submitted. I would consider this issue to be quite important - historical orders should never be submitted live as this may cause some serious problems

            Comment


              #7
              Hello,

              Thank you for the reply.

              I just wanted to post a quick reply letting you know I will review the video.

              I do want to note that when submitting bug reports for the beta, we do actually need to full details on what is happening, so all items that you do are actually important to finding the answer. I can not just guess on what may be happening as likely I would not end up doing the exact same sequence of actions you have. this may include the connection, syntax used, menu items used, any information that helps re produce the issue on our end so we can provide that to development.

              Once I have reviewed this further I will reply back.
              JesseNinjaTrader Customer Service

              Comment


                #8
                You may find attached useful - it is the exact data I run the strategy on in the video. The chart setting for 6E 03-16 is Tick: 150

                You already have the exact strategy from the previous post
                Attached Files

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by cpabiz20k, Today, 10:00 AM
                1 response
                2 views
                0 likes
                Last Post NinjaTrader_ChrisL  
                Started by rickyblah12, Today, 09:34 AM
                1 response
                4 views
                0 likes
                Last Post NinjaTrader_PatrickG  
                Started by CaptainAmericaXX, Today, 09:05 AM
                3 responses
                12 views
                0 likes
                Last Post CaptainAmericaXX  
                Started by tdawson11, Today, 07:48 AM
                1 response
                6 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by habibalex, Today, 09:03 AM
                1 response
                6 views
                0 likes
                Last Post NinjaTrader_PatrickG  
                Working...
                X