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

calculate on bar close for Entry Only, not Exit

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

    calculate on bar close for Entry Only, not Exit

    How can I make a strategy "calculate on bar close" for Entry only, while have the Exit logic based on bar close?

    Can I set the CalculateOnBarClose = false when flat, and CalculateOnBarClose = true; when strategy has an open position?

    Thanks.
    Last edited by yubo27; 09-24-2014, 08:50 AM.

    #2
    Hello yubo27,

    Thank you for your post.

    Please take a look at the reference sample at the following link for separating logic between bar close and every tick: http://www.ninjatrader.com/support/f...ad.php?t=19387

    Comment


      #3
      The post you sent me use FistTickOfBar as a way to filter ticks, but it does not answer my question.

      Could you please answer the question I posted. "Can I set the CalculateOnBarClose = false when flat, and CalculateOnBarClose = true; when strategy has an open position?" Does this work on live ticks.

      Thanks.

      Comment


        #4
        Originally posted by yubo27 View Post
        The post you sent me use FistTickOfBar as a way to filter ticks, but it does not answer my question.

        Could you please answer the question I posted. "Can I set the CalculateOnBarClose = false when flat, and CalculateOnBarClose = true; when strategy has an open position?" Does this work on live ticks.

        Thanks.
        Sure, you can. You might not get the result that you are expecting though.

        The answer you were given is the correct answer, because the FirstTickOfBar is coincident with the last tick of the previous bar.
        Last edited by koganam; 09-24-2014, 03:10 PM.

        Comment


          #5
          How would you access this calculate on first tick of bar from the strategy wizard? Is this even possible?

          Thanks.

          GuppyDRV

          Comment


            #6
            Hello GuppyDRV,
            Thank you for your post.


            Unfortunately, there is not an option to create this condition in the Strategy wizard.
            This will need to be manually programmed using the FirstTickOfBar property.
            Here is the FirstTickOfBar Help Guide to assist you further.


            I have included recorded webinar on NinjaScript, as well as links to our Help Guide on developing strategies to assist your further.


            NinjaTrader 7 Tips - Learn NinjaScript Tip #1


            NinjaScript Editor 401 - NinjaTrader 7 Training - YouTube


            I recommend reading through our educational resources section to get acquainted first:
            Educational Resources
            Developing Strategies
            Shawn B.NinjaTrader Customer Service

            Comment


              #7
              Shawn,

              Thanks for the reply, I'm afraid that I'm not a programmer and have no intentions of learning. However, this helps lead me in the right direction!

              Do you know if any third party engines such as Bloodhound would allow me to create this sort of strategy and back test from within their platform running on NT?

              GuppyDRV

              Comment


                #8
                Hello GuppyDRV,

                SharkIndicators' BloodHound product is available exclusively for NinjaTrader. It allows you to create and test your own strategies and indicators within NinjaTrader. Additionally, if you'd like to learn more, I encourage you to join this live event tomorrow with SharkIndicators. They generally spend some time showing how their tools work with NinjaTrader during these events.



                Please feel free to email me at info[at]ninjatraderecosystem[dot]com if you have any additional questions about strategy builders and tools compatible NinjaTrader.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Max238, Today, 01:28 AM
                5 responses
                40 views
                0 likes
                Last Post Max238
                by Max238
                 
                Started by giulyko00, Yesterday, 12:03 PM
                3 responses
                12 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Started by habeebft, Today, 07:27 AM
                1 response
                14 views
                0 likes
                Last Post NinjaTrader_ChristopherS  
                Started by AveryFlynn, Today, 04:57 AM
                1 response
                12 views
                0 likes
                Last Post NinjaTrader_Erick  
                Started by r68cervera, Today, 05:29 AM
                1 response
                10 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Working...
                X