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

Help adding a parameter with Strategy Builder.

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

    Help adding a parameter with Strategy Builder.

    How can I add a parameter which is only true if the pre market volume was more than lets say 1 million?
    I am using Strategy Builder.
    Thanks for everyone who helps.

    #2
    Hello Maoz1155,

    Thanks for your post.

    You could consider creating a bool variable (initially set to false) in the Inputs and Variables screen of the Strategy Builder.

    A Time Filter could then be created to have the strategy check if the time is during premarket hours. In the same Set, create another condition that checks if the Volume (Price folder > Volume) is greater than a Numerical value of 1 Million (Misc folder > Numerical value). Then in the Actions section, set your bool variable to True.

    Then you could check if the bool is true in other condition Sets.

    See this help guide page for information about creating a time filter to check if the time is between a range of times: https://ninjatrader.com/support/help...ateTimeFilters

    Note that you will need to create another condition in your strategy and flip the bool to false, otherwise it will remain true.

    Let me know if I may assist further.
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_BrandonH View Post
      Hello Maoz1155,

      Thanks for your post.

      You could consider creating a bool variable (initially set to false) in the Inputs and Variables screen of the Strategy Builder.

      A Time Filter could then be created to have the strategy check if the time is during premarket hours. In the same Set, create another condition that checks if the Volume (Price folder > Volume) is greater than a Numerical value of 1 Million (Misc folder > Numerical value). Then in the Actions section, set your bool variable to True.

      Then you could check if the bool is true in other condition Sets.

      See this help guide page for information about creating a time filter to check if the time is between a range of times: https://ninjatrader.com/support/help...ateTimeFilters

      Note that you will need to create another condition in your strategy and flip the bool to false, otherwise it will remain true.

      Let me know if I may assist further.
      For some reason it doesn't work for me.
      I am using a 1 min chart. The issue may be using "Volume (Price folder > Volume) is greater than a Numerical value of 1 Million" because it uses only 1 bar.
      Any way I can fix it?
      Also thank you so much!

      Comment


        #4
        Hello Maoz1155,

        Thanks for your note.

        That is correct, you would only be able to check the Volume for a single bar, and not the accumulated Volume during that timeframe.

        A limitation of the Strategy Builder is that it can only perform very simple math using offsets.

        You would need to unlock your code from the Strategy Builder by clicking the 'Unlock code' button and manually program this logic. You could consider creating a class-level double variable, checking if the Time is between the after-hours time frame and increment the variable by adding the Volume[0] to it. Then, you could check if the variable is greater than 1 Million and set your bool to True.

        See this help guide page for information about Volume[ ]: https://ninjatrader.com/support/help...ies_volume.htm

        For information about how to increment a variable using C#, you could do a quick Google search for something like 'how to increment variable C#'.

        Let me know if I may assist further.​
        Brandon H.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_BrandonH View Post
          Hello Maoz1155,

          Thanks for your note.

          That is correct, you would only be able to check the Volume for a single bar, and not the accumulated Volume during that timeframe.

          A limitation of the Strategy Builder is that it can only perform very simple math using offsets.

          You would need to unlock your code from the Strategy Builder by clicking the 'Unlock code' button and manually program this logic. You could consider creating a class-level double variable, checking if the Time is between the after-hours time frame and increment the variable by adding the Volume[0] to it. Then, you could check if the variable is greater than 1 Million and set your bool to True.

          See this help guide page for information about Volume[ ]: https://ninjatrader.com/support/help...ies_volume.htm

          For information about how to increment a variable using C#, you could do a quick Google search for something like 'how to increment variable C#'.

          Let me know if I may assist further.​
          Is there a way on Strategy builder to just to sum up each candle volume between my time zone??

          Comment


            #6
            Hello Maoz1155,

            Thanks for your note.

            No, this summing up the volume of each candle would require unlocking your code from the Strategy Builder as stated in my previous post.

            "You would need to unlock your code from the Strategy Builder by clicking the 'Unlock code' button and manually program this logic. You could consider creating a class-level double variable, checking if the Time is between the after-hours time frame and increment the variable by adding the Volume[0] to it. Then, you could check if the variable is greater than 1 Million and set your bool to True."

            Let me know if I may assist further.
            Brandon H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by ETFVoyageur, Yesterday, 02:04 PM
            5 responses
            38 views
            0 likes
            Last Post ETFVoyageur  
            Started by Creamers, 04-27-2024, 05:32 AM
            6 responses
            43 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by iceman2018, Today, 11:46 AM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_Erick  
            Started by Torontobluejays, Yesterday, 08:43 AM
            4 responses
            23 views
            0 likes
            Last Post Torontobluejays  
            Started by Ticks_66, Today, 09:50 AM
            2 responses
            14 views
            0 likes
            Last Post Ticks_66  
            Working...
            X