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

Time entry

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

    Time entry

    I am using a time indicator. see attached pic. Click image for larger version

Name:	Time Indicator.jpg
Views:	322
Size:	120.4 KB
ID:	1117256 I am trying to build a strategy that will enter an order at the start time in strategy builder. What would I need to use in the conditions? Click image for larger version

Name:	Time Indicator conditions.jpg
Views:	305
Size:	138.4 KB
ID:	1117257 Thx

    #2
    When the indicator prints at the time entered submit order.

    Comment


      #3
      Hello JTizz,

      Thank you for your post.

      I'm unfamiliar with this pariticular indicator and am unsure if it has exposed plots that give a particular time that could be compared with a DateTime in the Strategy Builder. I would advise reaching out to the folks at Ninza.co as it appears they're the ones that developed this particular indicator, as they would be most familiar with the code and whether or not it supplies plots that can be used with the Strategy Builder.

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

      Comment


        #4
        Dou you have any links or info what an exposed plot is?

        Comment


          #5
          Found it on NT website thx

          Comment


            #6
            Her is Ninza's reply:
            You can rely on the Signal_Times below to build your own strategy.
            • Signal_Time1: 1 = during trading time, 0 = out of trading time
            • Signal_Time2: 1 = during trading time, 0 = out of trading time
            • Signal_Time3: 1 = during trading time, 0 = out of trading time

            Comment


              #7
              With that info the answer to my original question? Thx

              Comment


                #8
                Hello JTizz,

                Thank you for your reply.

                From their response it looks like you can't compare the current time - the indicator simply returns a value of 1 if the current time is within trading time and 0 if it is not. So, what you'd want to do would be dependent on whether you just want to take a single trade during a trading time period as defined by the indicator properties, or if you want the strategy to be able to continuously trade if the initial trade is exited before that trading period is over.

                If you just want it to limit the trades to the defined trading periods, you could just add a condition to your entries for the signal times:

                if (SignalTime1 ==1)
                {
                //first signal time entry logic goes here
                }
                if (SignalTime2 == 1)
                {
                // second signal time entry logic goes here
                }
                if (SignalTime3 == 1)
                {
                // third signal time entry logic goes here
                }

                If you want it to only take one trade at the beginning of each signal time period, you could use a bool for each period - for example, create a Bool called Signal1Entered and set it to false, then when you enter the first time for the first signal period, check whether it is false before entering, then set it to true after the entry is made. Then, once SignalTime1 == 0 again, set it back to false for the next day's entry at that time.

                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 BarzTrading, Today, 07:25 AM
                2 responses
                15 views
                1 like
                Last Post BarzTrading  
                Started by devatechnologies, 04-14-2024, 02:58 PM
                3 responses
                19 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Started by tkaboris, Today, 08:01 AM
                0 responses
                3 views
                0 likes
                Last Post tkaboris  
                Started by EB Worx, 04-04-2023, 02:34 AM
                7 responses
                162 views
                0 likes
                Last Post VFI26
                by VFI26
                 
                Started by Mizzouman1, Today, 07:35 AM
                1 response
                10 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Working...
                X